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: Create New Object based on attribute value of existing object in another module
Topic Summary: Creating New Objects based on value of an existing object's attribute
Created On: 30-May-2007 18:06
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.
Answer This question was answered by Chris Annal, on Friday, June 1, 2007 4:54 PM

Answer:
Thanks, Ron. As it turned out, I discovered other issues with using the loop in the above script, and I ended up using a Skip List to capture the needed attribute value from each object, then populated the 2nd module from the Skip List, which seems to be working so far...
Thanks!!
 30-May-2007 18:06
User is offline View Users Profile Print this message


Chris Annal

Posts: 36
Joined: 14-Dec-2005

I have a module for Problem Reports (named PR_Supplement in the script) and a module I'm developing for the Software that will implement the changes needed to fix those problems. I wrote a script that will go into the "PR_Supplement" module and look at the "Created On" date, then compare that with the "CSCIs" module date attribute (Updated_Date).
If the "Created On" date for an object in the "PR_Supplement" module is greater than the CSCIs module "Updated_Date", then a new object should be created in the CSCIs module for that object.
The script so far is attached below, but I'm having a problem with the following lines:

oCSCI = gotoObject(1577, mCSCIs) 
Object oNewPR = create below oCSCI

It seems like the above doesn't automatically make the "CSCIs" module the current module, since these lines are in the middle of a loop that is running in the "PR_Supplement" module, and I get the following error:

-R-E- DXL: <Line:29> creating object not in current module

-I- DXL: execution halted

What am I doing wrong?

Thanks,

Report this to a Moderator Report this to a Moderator
 30-May-2007 18:27
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

Easy fix is to set mCSCI as current similar to following:


Module mC

//within the loop

mC = current //set mC to current
current = mCSCI //change module that is current
//perform your create function
current =mC //set back to original module
Report this to a Moderator Report this to a Moderator
 1-Jun-2007 16:54
User is offline View Users Profile Print this message


Chris Annal

Posts: 36
Joined: 14-Dec-2005

Answer Answer
Thanks, Ron. As it turned out, I discovered other issues with using the loop in the above script, and I ended up using a Skip List to capture the needed attribute value from each object, then populated the 2nd module from the Skip List, which seems to be working so far...
Thanks!!
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 2 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 2 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.