Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: Help needed for Baseline dates for modules in project
Topic Summary: Help needed for Baseline dates for modules in project
Created On: 24-Jan-2006 21:39
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 24-Jan-2006 21:39
User is offline View Users Profile Print this message


Bernadette Duzon-Pickett

Posts: 1
Joined: 24-Jan-2006

Hi Anyone,

I'm trying to get the module baseline dates to print with the output for this DXL script, but it is not cooperating.  The script is very simple and I know that I have to open the module and close the module, but I'm not sure how to do it.

Eternally thankful,

Bernadette  ( -embarrassed  and disgusted)

bernadette_duzon-pickett@freddiemac.com

**************************************************************

string mName
Module m

Project p = current
for mName in p do {
 if (!open module mName) {
  read(mName,false)
  Module m = current
  print mName "\t\t"
  print(type module mName) "\t" "Revision: "(version m) "\n"
  string attlmb = m."Last Modified By"
  string attlmo = m."Last Modified On"
           
  print "Last Modified By: "attlmb "\n"
  print "Last Modified on: " attlmo "\n"

  print "________________________________________"
  print "\n\n"

  close m
 }
}
//}
//}

Report this to a Moderator Report this to a Moderator
 25-Jan-2006 11:58
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

The code attached should get you started.
This script loops recursively through the current folder and prints baseline information for each formal module it finds.

Two example functions are provided. one prints the latest baseline only, the other print all baselines.

The template for this script came from

here.

-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 25-Jan-2006 16:43
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

The " for string in project do" loop only finds modules in the project's root folder. The "for Module in project do" loop only finds currently open modules. Its better to use the "for Item in project" loop, getting the "type(itm)", rejecting those that are not "formal":
Project pCurr = current
Item itm

for itm in pCurr do
{ if (type(itm) != "Formal") continue
deal with this formal module
}

Use the module handle in the read statement. Relying on setting the "current" module is VERY unreliable.
module mod = read(NameMod, false).

Many sorts of loops in DXL cannot be nested within the same sort of loop: You cannot have an outer loop of links from an object that also contains an inner loop of links from that object (or I believe from any object). For Baselines, you should routinely stage the baselines in a Skip list, then loop through the skip. Setting the "key" of the Skip to an incrementing integer insures that the Skip list loop retrieves baselines in the original oldest-to-most-recent order:

Baseline bl
Skip skpBLs = create // Key is sequence, data is Baseline
int Sequence = 0

for bl in mod do
{ put(skpBLs, Sequence++, bl)
}
for bl in skpBLs do
{ deal with this baseline
}
delete(skpBLs)

- Louie
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.