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: link by attribute help
Topic Summary:
Created On: 15-Mar-2007 12:05
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 David Pechacek, on Thursday, March 15, 2007 2:44 PM

Answer:
I think this is what you're looking for. Instead of looping through fModule2 each time it'd be better to put all of fModule2's objects in a Skip List and use whatever you want to match by as the key. Then use find() to find the match. Would be extremely faster but I didn't know what exactly you were looking to match. I interpreted it as you are looking to find the first 5 characters of attrKeyFM1 inside the string of attrKeyFM2 (and coded it as such).
 15-Mar-2007 12:05
User is offline View Users Profile Print this message


Sal Kabay

Posts: 6
Joined: 6-Jul-2006

First of all I am not a programmer or a DOORS expert ... but I have a simple requirement (i hope).

I've figured out how to use Link By Attribute to link together two modules. What I actually require to make this feature work for me is a DXL script that does the following:

1. within a given formal fModule1, create an empty text attribute attrFM1
2. take a specific text attribute within fModule1 say attrKeyFM1 and search for a match of the first 5 characters within formal fModule2 attrKeyFM2
3. where a match is found, take the matching object number from formal fModule2 and store it as a text item within formal fModule1 attrFM1

Running this will allow me to link together a huge number of project documents very quickly and will be a huge help at a client.

Really appreciate your help!



Edited: 15-Mar-2007 at 12:08 by Sal Kabay
Report this to a Moderator Report this to a Moderator
 15-Mar-2007 12:46
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

Answer Answer
I think this is what you're looking for. Instead of looping through fModule2 each time it'd be better to put all of fModule2's objects in a Skip List and use whatever you want to match by as the key. Then use find() to find the match. Would be extremely faster but I didn't know what exactly you were looking to match. I interpreted it as you are looking to find the first 5 characters of attrKeyFM1 inside the string of attrKeyFM2 (and coded it as such).

-------------------------
David Pechacek
AAI Services Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com

Edited: 15-Mar-2007 at 12:56 by David Pechacek
Report this to a Moderator Report this to a Moderator
 15-Mar-2007 14:36
User is offline View Users Profile Print this message


Sal Kabay

Posts: 6
Joined: 6-Jul-2006

Awesome David ... I owe you a beer!! I had to make a few minor tweaks see attached code to make it work for me ... one thing I was intrigued with was being able to do the link directly via the statement


s <- "your link module name" <- o

I'm assuming the above syntax will create in-links from "o" into "s"?

Is there a way in the syntax to tell it to do the linkage both ways?



Edited: 15-Mar-2007 at 18:29 by Sal Kabay
Report this to a Moderator Report this to a Moderator
 15-Mar-2007 14:45
User is offline View Users Profile Print this message


Sal Kabay

Posts: 6
Joined: 6-Jul-2006

OK ... David, tried out the following to give me 2-way linkage and worked a treat!! This will save me so much time!!

s <- "DOORS Links" <- o

o <- "DOORS Links" <- s

Report this to a Moderator Report this to a Moderator
 15-Mar-2007 14:54
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

quote:

I'm assuming the above syntax will create in-links from "o" into "s"?
The link would be created as an outlink from o to s. So yes if you are looking at s it is an inlink, o an outlink.
quote:

Is there a way in the syntax to tell it to do the linkage both ways?
Simply swap s and o around and use a different link module (I don't think you can create a link both ways through the same link module). Why would you want to create the link both ways though? Only reason I see is so you can find the link from one object to the other in either object. However, you can still find the link in s (would be an inlink) by doing a loop through the links using:

-------------------------
David Pechacek
AAI Services Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com

Edited: 15-Mar-2007 at 14:55 by David Pechacek
Report this to a Moderator Report this to a Moderator
 15-Mar-2007 14:59
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

quote:

Originally posted by: Sal Kabay OK ... David, tried out the following to give me 2-way linkage and worked a treat!! This will save me so much time!! s <- "DOORS Links" <- o

o <- "DOORS Links" <- s


Ok I guess you can. Personally I wouldn't though. And as I said above, its not necessary in order to get to o from s.

-------------------------
David Pechacek
AAI Services Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 2 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 2 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.