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: 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
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 Jon Martin, on Monday, January 28, 2008 12:24 PM

Answer:
It works!!!

Thank you so much.
 24-Jan-2008 14:19
User is offline View Users Profile Print this message


Jon Martin

Posts: 49
Joined: 22-Nov-2006

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?
Report this to a Moderator Report this to a Moderator
 24-Jan-2008 14:39
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

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
Report this to a Moderator Report this to a Moderator
 24-Jan-2008 14:50
User is offline View Users Profile Print this message


Scott Boisvert

Posts: 348
Joined: 14-Apr-2006

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
Report this to a Moderator Report this to a Moderator
 24-Jan-2008 15:04
User is offline View Users Profile Print this message


Scott Boisvert

Posts: 348
Joined: 14-Apr-2006

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
Report this to a Moderator Report this to a Moderator
 24-Jan-2008 15:06
User is offline View Users Profile Print this message


Jon Martin

Posts: 49
Joined: 22-Nov-2006

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).
Report this to a Moderator Report this to a Moderator
 24-Jan-2008 15:21
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

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
Report this to a Moderator Report this to a Moderator
 24-Jan-2008 15:30
User is offline View Users Profile Print this message


Jon Martin

Posts: 49
Joined: 22-Nov-2006

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'
Report this to a Moderator Report this to a Moderator
 24-Jan-2008 15:33
User is offline View Users Profile Print this message


Scott Boisvert

Posts: 348
Joined: 14-Apr-2006

Originally posted by: David Pechacek

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
Report this to a Moderator Report this to a Moderator
 24-Jan-2008 15:37
User is offline View Users Profile Print this message


Scott Boisvert

Posts: 348
Joined: 14-Apr-2006

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
Report this to a Moderator Report this to a Moderator
 24-Jan-2008 15:37
User is offline View Users Profile Print this message


Scott Boisvert

Posts: 348
Joined: 14-Apr-2006

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
Report this to a Moderator Report this to a Moderator
 24-Jan-2008 15:38
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

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
Report this to a Moderator Report this to a Moderator
 24-Jan-2008 15:39
User is offline View Users Profile Print this message


Scott Boisvert

Posts: 348
Joined: 14-Apr-2006

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
Report this to a Moderator Report this to a Moderator
 24-Jan-2008 18:16
User is offline View Users Profile Print this message


Scott Boisvert

Posts: 348
Joined: 14-Apr-2006

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
Report this to a Moderator Report this to a Moderator
 24-Jan-2008 18:18
User is offline View Users Profile Print this message


Scott Boisvert

Posts: 348
Joined: 14-Apr-2006

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
Report this to a Moderator Report this to a Moderator
 28-Jan-2008 12:24
User is offline View Users Profile Print this message


Jon Martin

Posts: 49
Joined: 22-Nov-2006

Answer Answer
It works!!!

Thank you so much.
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.