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: Reverse Links
Topic Summary:
Created On: 22-Jan-2003 15:04
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 Jobina Johnson, on Friday, January 31, 2003 12:43 PM

Answer:
Here is a reverse links file. I forget where I got it.

JJ
 22-Jan-2003 15:04
User is offline View Users Profile Print this message


Grimsdale Michael

Posts: 1
Joined: 11-Oct-2002


I seem to remember that I found a DXL routinue that would reverse the direction of links, does anyone know of one, as I now cannot find it. We need to reverse the links within our database (Vers 5.2).
Thanks for any help. Mike Grimsdale
Report this to a Moderator Report this to a Moderator
 24-Jan-2003 19:06
User is offline View Users Profile Print this message


Jobina Johnson

Posts: 55
Joined: 12-Sep-2002

Answer Answer
Here is a reverse links file. I forget where I got it.

JJ

-------------------------


jobina.l.johnson@boeing.com
Report this to a Moderator Report this to a Moderator
 23-Apr-2004 14:24
User is offline View Users Profile Print this message


Ryan McGilvrey

Posts: 5
Joined: 23-Apr-2004

The old version of reverselinks02 does not work with v7.0sp1. I received a new version (reverselinks04, attached) and it worked once, but I cannot get it to work again. Could someone please help figure out why? Maybe it will work for you. Please let me know. Thanks.
Report this to a Moderator Report this to a Moderator
 23-Apr-2004 15:56
User is offline View Users Profile Print this message


Ross Morgan

Posts: 74
Joined: 15-Apr-2004

works fine for me in 7.0 SP1

are you getting any error messages?
do you have RMD access to the source and target formal modules and the link modules?
Report this to a Moderator Report this to a Moderator
 23-Apr-2004 16:22
User is offline View Users Profile Print this message


Ryan McGilvrey

Posts: 5
Joined: 23-Apr-2004

Yeah. Like I said, it worked once. Here's the details:
I received the script and ran it immediately, but received a DXL error message.
I closed that and ran it again, but it just wouldn't work right. After choosing incoming or out-going links, then choosing the link module, I don't get any formal modules listed.
A few days later, I ran it and it worked! Same directory and files. Don't know why. Right away, I tried it on the next module and it wouldn't work. Went back and tried the original module and it wouldn't work there either.

I feel like I've tried everything. If you have any ideas, please suggest them. Even if they sound obvious.

Thanks.
Report this to a Moderator Report this to a Moderator
 26-Apr-2004 15:18
User is offline View Users Profile Print this message


Ross Morgan

Posts: 74
Joined: 15-Apr-2004

I think I might know what the problem is...

the script has two problems
(1)it doesn't flush deletions before saving the modules
(2)it leaves modules open


for (1), replacing...

if (option==0) {
save lnkdMod
save currMod
}

with ...
if (option==0) {
flushDeletions()
save lnkdMod
save currMod
}

...partly solves the flushing problem for in-links. If the object is linked to several other modules then this will only flush one of them. So a bit more DXL is needed to flush each entry in formalModSkipList which has been changed.

problem (2) is caused by...
"if !open module formalModName then read(formalModName,false)"

...because there is no corresponding close() statement. The crude solution is to do a "close(lnkdMod)" - but then you may have already had it open and want to keep it open. Once again, a bit more DXL is needed to track the status of modules and leave them as they were found.

before you try this, you may have some module locks lying about - so delete them - then restart DOORS.
Report this to a Moderator Report this to a Moderator
 26-Apr-2004 16:35
User is offline View Users Profile Print this message


Ross Morgan

Posts: 74
Joined: 15-Apr-2004

try this...
Report this to a Moderator Report this to a Moderator
 26-Apr-2004 18:52
User is offline View Users Profile Print this message


Ryan McGilvrey

Posts: 5
Joined: 23-Apr-2004

Thanks again for your help. But, I still have the same problem. I've checked the locks and open modules and all looks good. Attached is a picture of the window, showing the farthest I get. The formal module contains hundreds of outlinks through the SVTT Links module.
Report this to a Moderator Report this to a Moderator
 26-Apr-2004 22:20
User is offline View Users Profile Print this message


Ross Morgan

Posts: 74
Joined: 15-Apr-2004

the problem is that the link module isn't in the current folder, so the line...
string linkModName = (module l)."Name"
...adds the link module name relative to the current folder. If the link module isn't in the current folder, then
o->"STTV Links"
wont resolve, but
0->"/<the path to STTV Links>/STTV Links"
will. Try using the fullName...
string linkModName = fullName(module l)
Report this to a Moderator Report this to a Moderator
 28-Apr-2004 13:45
User is offline View Users Profile Print this message


Ryan McGilvrey

Posts: 5
Joined: 23-Apr-2004

Great! Thank you.
Report this to a Moderator Report this to a Moderator
 3-Jan-2006 16:45
User is offline View Users Profile Print this message


Jörg Werner

Posts: 24
Joined: 29-Jul-2005

Hi,

can someone attach the reverse link script again to this thread?

   thanks and happy new year :-)

            Jörg
Report this to a Moderator Report this to a Moderator
 4-Jan-2006 08:29
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

Try the attached.

reverselinks4.dxl
reverselinks4.dxl  (11 KB)



-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 4-Jan-2006 16:57
User is offline View Users Profile Print this message


Jörg Werner

Posts: 24
Joined: 29-Jul-2005

Thanks Tony!

this script works fine!

I've added a field, so that the user can also define a target Link Module.

    Joerg

reverselinks5.dxl
reverselinks5.dxl  (12 KB)

Report this to a Moderator Report this to a Moderator
 10-Jan-2006 22:46
User is offline View Users Profile Print this message


Michael Sutherland

Posts: 248
Joined: 13-Sep-2002

Joerg, Tony,

I attempted to use the script, but it didn't work because the source and target modules were in different folders for my particular situation.

I made a quick update to switch the code over to use module full names. It may not be a complete update, but it worked for my particular situation.

reverselinks6.dxl
reverselinks6.dxl  (13 KB)



-------------------------
Michael Sutherland
michael@galactic-solutions.com
http://galactic-solutions.com
Report this to a Moderator Report this to a Moderator
 9-Jul-2008 20:21
User is offline View Users Profile Print this message


Rich Mason

Posts: 26
Joined: 11-Apr-2007

guys, thanks for the great script. I was able to use this from a target module and turn inlinks into outlinks. However, it didn't seem like the script would work for reversing outlinks. The Link Module window wouldn't populate when the oulink option was selected. tried it on a couple different modules, so dunno what's happening.

not a problem tho b/c I was able to do what I wanted with the reverse inlink option. just fyi.

thanks

-------------------------
Rich Mason
richard_mason@drsoptronics.com
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 0 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 0 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.