![]() |
Telelogic DOORS (steve huntington) | ![]() |
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 |
![]() |
![]()
|
![]() 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!! | |
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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!! |
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.