![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
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 |
![]() |
![]()
|
![]() |
|
Hi Anyone, Project p = current print "________________________________________" close m |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.