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: "for o in mod" in baseline module
Topic Summary: When using "load" to open a past baseline, "for o in mod" loop breaks
Created On: 29-Jun-2006 00:21
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.
 29-Jun-2006 00:21
User is offline View Users Profile Print this message


jason haury

Posts: 10
Joined: 13-Oct-2005

Hi All,

I have a basic function that counts the number of modified requirement objects that were changed btween given dates in a particular baseline. When I open the module in question, then open the baseline so that it is visible, the script works fine, but when I run the scipt and specify a different baseline than the one currently open, the script returns a 0.  I've attached the function along with a couple lines that set up the arguments and call the function.  I've taken out my debug code which allowed me to see that the correct ModuleVersion was "loaded". 



I want to "read" a module without displaying it, and have it opened to a specified baseline.  according to the help file, "load" does just that.  (type in "load(ModuleVerison)" in the DXL Reference Index)

Any clues?

Thanks!
Jason
Report this to a Moderator Report this to a Moderator
 29-Jun-2006 12:50
User is offline View Users Profile Print this message


Reik Schroeder

Posts: 361
Joined: 28-Jul-2003

Hi Jason,
you should try to use
for o in entire mod do {
if (!isDeleted o) {
....
}
}

May be this will help to solve your problem. Doors is sometimes a little bit strange. Many functions will work on currently used view, so if you load a module in background you won't have any view.

Greetings
Reik Schröder

-------------------------
Evosoft GmbH
for Siemens Industry Sector


Berlin, Germany
Report this to a Moderator Report this to a Moderator
 29-Jun-2006 22:43
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

As Reik pointed out, routinely use "for o in entire mod do"; if (isDeleted(o)) continue" construct for all your object loops. This deals with the cases the module has some filter or leveling that hides objects; which is especially important for modules opened visibly (and have a default view).

Sorry I haven't dealt with module version stuff yet in DXL. But it sure seems to me that your "load(modver, false) command should return some handle that should be used; probably "Module mBase". It looks to me that your script is searching history of the current module instead of one of the baselines. Shouldn't your loop be "for o in entire mBase do"?

The only way two baselines could have History for a given date range is when the baseline is created during that range. If the create date of a baseline is before your startDate, and the next baseline was created after your endDate, then only one baseline will have history you care about.

- Louie
Report this to a Moderator Report this to a Moderator
 10-Jul-2006 18:25
User is offline View Users Profile Print this message


jason haury

Posts: 10
Joined: 13-Oct-2005

Thanks for your replies.  I am actually trying to look at histories in specific baselines, not just deleted Objects in the most recent baseline. 

My question can reduce to this: Using DXL, how can I open a particular baseline of a module?

Thanks!
Jason
Report this to a Moderator Report this to a Moderator
 10-Jul-2006 22:05
User is offline View Users Profile Print this message


Shawn Stepper

Posts: 96
Joined: 6-Aug-2004

Change to the following:

Baseline bl = baseline(6,0,null)
Module baseMod = load(bl, false)
Date d1 = "01 aug 2002", d2 = "01 oct 2002"
If (!null(baseMod )) {
print changedCount(baseMod , bl, d1, d2)
}

The difference is using baseMod instead of mod.

-------------------------
Shawn Stepper
shawn.e.stepper@wellsfargo.com
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.