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: Copy DOORS links between Objects
Topic Summary: Copy DOORS links between Objects
Created On: 20-Aug-2007 07:26
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.
 20-Aug-2007 07:26
User is offline View Users Profile Print this message


Madhubanti Mukherjee

Posts: 13
Joined: 20-Feb-2007

Does anyone have any script to copy all or selected links from one object to another within the same module? Also , we may try  to copy links from one source object in Module A to another object in module B  keeping the destination object the same and asking for choice of link module in this case ?

Any light on this issue would be great help .

Report this to a Moderator Report this to a Moderator
 20-Aug-2007 13:33
User is offline View Users Profile Print this message


Scott Boisvert

Posts: 348
Joined: 14-Apr-2006

I've done some scripts with moving links, but not for what your looking for.  Not that it's not impossible, it actually looks like a fairly simple script.

Basically all you need to do is designate the two source objects, the loop through the links in the original source object, at each link you grab the target module and target object and use that to create a new link in the second source object.  Pretty simple.

As for the module A and Module B example, the same thing would apply.

Asking for a link module is easy by using the miniExplorer, which is discussed in the undocumented DXL functions thread I believe.

-------------------------
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
 20-Aug-2007 22:49
User is offline View Users Profile Print this message


Scott Boisvert

Posts: 348
Joined: 14-Apr-2006

Got bored and and had little free time today.  Hope this helps:

-------------------------
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
 21-Aug-2007 08:17
User is offline View Users Profile Print this message


Madhubanti Mukherjee

Posts: 13
Joined: 20-Feb-2007

Thanks a lot  for your help .It really helped me a lot.

I also tried to add the feature to copy inlinks as well in the same way as you have copied outlinks.

I have attached the code here, but somehow it seems to do nothing. I have no clue as to why it does not work. Any help please?

Report this to a Moderator Report this to a Moderator
 21-Aug-2007 12:47
User is offline View Users Profile Print this message


Scott Boisvert

Posts: 348
Joined: 14-Apr-2006

Well inlinks are a little tricky.  The soul reason is that technically you can only create out links.  So what this means is you have to have Exclusive Edit access ot the source module/object.  Unlike out links you can not set an object via the "source (l)" command unless the source module is open.  So what we have to is first cycle through the link references of the inlinks and open the associated source modules.  Once we have done that, we can then cycle through the actual links and "copying" the links to the new object.

I've updated the script to copy both in and out links in the same function, that way the variables don't have to be redeclared.  I also forgot to close the modules that we opened while following the links in the previous script.  I've add some logic to close all open modules except the two "source" modules (the module you are copying links from and the module you are copying links to).

With the inlinks, as I mentioned before, the link must be created from the source object, hence the history will reflect a change to the source object not the object you are copying the links to.  From a configuration management prespective this could be a nightmare if you don't know which objects you've touched.  If I'm to do something like this, with in links I usually have to kick everyone out of DOORS while I run the script to ensure that noone has a module locked that the script will need Exclusive Edit access for. I also put logic in the script to output the module and object identifier of all objects that have been modified, as well as updating some tracking attributes that we have in all our modules for CM purposes.

Use this script with caution for the reasons I mentioned above.....Other than that I hope this helps.

****EDIT (8/20/07 11:46am EST)****

Updated script found an error or two that needed fixing.



-------------------------
Scott Boisvert
Engineering Tools Administrator
L-3 Communications - Avionics Systems
scott.boisvert@l-3com.com

Edited: 21-Aug-2007 at 16:57 by Scott Boisvert
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.