![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: How to copy objects (with links) between module Topic Summary: Created On: 24-Jan-2008 14:19 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: It works!!! Thank you so much. | |
![]() |
|
Hi All
I'm looking for a DXL that can copy objects between module and copy the links too (I need to merge four modules). I used the "copyobj" from the kitchen but it didn't work. Any idea? |
|
![]() |
|
![]() |
|
Well there is no direct way to copy objects between modules (eg. copy and paste).
If both the source and the destination modules have all the same attributes, you simply create a new object in your destination modules and set the sources data equal to the destinations for each attribute. If not, you'll have to check that each attribute exists and create it if not. When you say merge, do you mean just move each modules objects one after another into a single module? Or does the order of the objects in the new module matter? If so you'll have to have some logic for that since the new objects won't have the same Object Identifiers as the old (I would recommend copying the Object ID of the old module to the new to use as a reference). Depending on whether or not you care about the placement of each modules objects (module As objects, then B's, C's, and D's or something else), it's pretty simple. Give me a little more info and I'll see what I can do. ------------------------- David Pechacek AAI Services Textron dpechacek@sc-aaicorp.com David.Pechacek@gmail.com Edited: 24-Jan-2008 at 14:40 by David Pechacek |
|
![]() |
|
![]() |
|
I've done something similar.
I have one script that "records" the out links in an attribute kinda links in the format: full module name >> identifier (target Object) or full module name >> absolute number (traget Object) You can then copy the object, making sure you copy the attribute the links were recorded in. Then I have another script to "restore" the out links, which parses through the attribute of each object separating the module name and the absolute number of the object it is linked to, then creates the link. You can do the same thing for in links as well if you have access to the source modules. You'll have to forgive my blatent abuse of string variables instead of Buffers as I wrote this script a few years ago before I knew better, but it still works.... Just select the module in the DOORS Explorer and run the script ............AAAAhhhhh....Disregard..... That script was specific to our database for a spefic purpose...Lemme find my general one.... ------------------------- Scott Boisvert Engineering Tools Administrator L-3 Communications - Avionics Systems scott.boisvert@l-3com.com Edited: 24-Jan-2008 at 14:55 by Scott Boisvert |
|
![]() |
|
![]() |
|
OK...just tested this and it works as a general script to restore links where the links are stored in a attribute called "Parent list" in the format of:
fullName (target module) >> identifier (target object) or fullName (target module) >> target object."Absolute Number" ------------------------- Scott Boisvert Engineering Tools Administrator L-3 Communications - Avionics Systems scott.boisvert@l-3com.com |
|
![]() |
|
![]() |
|
Hi David
I need to move all objects from module A into an existing module name B After the objects are located in module B i can move them manually (by Drag & drop). |
|
![]() |
|
![]() |
|
Heh. Either you don't have a lot of objects or you have far more patience to sit there and drag and drop than I do.
Does Scott's code help you out? I could probably easily write something that'll do what you want if not. Scott is your code just for recreating the links? ------------------------- David Pechacek AAI Services Textron dpechacek@sc-aaicorp.com David.Pechacek@gmail.com |
|
![]() |
|
![]() |
|
David
I have about 250 objects and about 1000 in-links. There are 3 people that will "drag and drop" so... Scott, Does your script can "copy" in-links too? If Yes, Can you explain how to preform the "records"?? Thanks' |
|
![]() |
|
![]() |
|
Heh. Either you don't have a lot of objects or you have far more patience to sit there and drag and drop than I do. Does Scott's code help you out? I could probably easily write something that'll do what you want if not. Scott is your code just for recreating the links? Yeah, that code is for just recreating the out links. The idea is that you woul have another script to record the links in the "Parent list" attribute of the objects in Module A. Then use the built in copy objects function making sure you copy the "Parent list" attribute to copy the objects from Module A to Module B. Then run the script on Module B. Granted, I probably should go and update the script as it could be written much more efficiently......I just haven't used it in a longggggg time. ------------------------- Scott Boisvert Engineering Tools Administrator L-3 Communications - Avionics Systems scott.boisvert@l-3com.com |
|
![]() |
|
![]() |
|
Delete.....
------------------------- Scott Boisvert Engineering Tools Administrator L-3 Communications - Avionics Systems scott.boisvert@l-3com.com Edited: 24-Jan-2008 at 15:38 by Scott Boisvert |
|
![]() |
|
![]() |
|
Delete
------------------------- Scott Boisvert Engineering Tools Administrator L-3 Communications - Avionics Systems scott.boisvert@l-3com.com Edited: 24-Jan-2008 at 15:39 by Scott Boisvert |
|
![]() |
|
![]() |
|
You're right Scott. There is a built in copy objects function. I've never noticed it since I never used it.
Jon: Tools -> Functions -> Copy Objects Then you just need DXL to copy over the info Scott's script needs. That's pretty simple. ------------------------- David Pechacek AAI Services Textron dpechacek@sc-aaicorp.com David.Pechacek@gmail.com |
|
![]() |
|
![]() |
|
Unfortunately that particular script only restores the out links. It was designed with a specific purpose in mind and did not require the restoration of in links.....
The same approach can be taken to restore the links....... Let me see if I can throw something together real quick to do in links. ------------------------- Scott Boisvert Engineering Tools Administrator L-3 Communications - Avionics Systems scott.boisvert@l-3com.com Edited: 24-Jan-2008 at 15:42 by Scott Boisvert |
|
![]() |
|
![]() |
|
Got sidetracked....
Two post solution... - In Module A and Module B create an Object Text attribute called "Child list". - Run the attached script in Module A. Use the copy objects function to copy the objects into Module B making sure you copy the "Child list" attribute. See next post for step 2 ------------------------- Scott Boisvert Engineering Tools Administrator L-3 Communications - Avionics Systems scott.boisvert@l-3com.com |
|
![]() |
|
![]() |
|
Step2....
Should state, before running the script, close all modules. Then select the Module B in the DOORS Explorer. The run the attached script. Select the link module you want the links to go through. Click OK. This will restore all the in links that are stored in the "Child list" attribute. When the script completes you'll be asked to save the link modules. ------------------------- Scott Boisvert Engineering Tools Administrator L-3 Communications - Avionics Systems scott.boisvert@l-3com.com Edited: 24-Jan-2008 at 18:20 by Scott Boisvert |
|
![]() |
|
![]() |
|
It works!!!
Thank you so much. |
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.