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 retrieval order
Topic Summary:
Created On: 17-Apr-2003 18:08
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.
 17-Apr-2003 18:08
User is offline View Users Profile Print this message


Bradley Porter

Posts: 6
Joined: 6-Feb-2003

In the for all outgoing links and for all incoming links loops, the help file describes the process as looping through each "successive" outgoing or incoming link.

My question is how is the order of "succession" determined?

I've displayed the "Created On" and "Last Modified On" attributes for both the link and the source objects on an incoming links loop and it does not seem to sort the retrieval order based on either of these values. The links have an "Absolute Number" attribute, but it is empty, so that isn't it. The retrieval order is also not based on the "Absolute Number" of the source object.

So how is the order of retrieval determined?

Brad Porter
Ball Aerospace & Tech. Corp.
bporter@ball.com
Report this to a Moderator Report this to a Moderator
 17-Apr-2003 19:03
User is offline View Users Profile Print this message


Michael Sutherland

Posts: 248
Joined: 13-Sep-2002

Bradley,

Links do have an "Absolute Number". Run the following code inside a Link Module. I'm not sure if this information will help in your quest.

I have a vague memory that the order was related to the order of creation, but your experiments seem to void that conclusion. I once had to control the order of Link display for a project, so I scanned the Links, inserted them into a Skip list based on a key that ordered them as I desired, and then output them from the Skip list once the scanning was complete.

-------------------------
Michael Sutherland
michael@galactic-solutions.com
http://galactic-solutions.com

Edited: 17-Apr-2003 at 19:55 by Michael Sutherland
Report this to a Moderator Report this to a Moderator
 17-Apr-2003 19:44
User is offline View Users Profile Print this message


Bradley Porter

Posts: 6
Joined: 6-Feb-2003

Interesting... when you reference the default link attributes (Absolute Number, Source, Source Index, Target, Target Index) as a property of the link (such as l."Absolute Number") they appear to be empty. This is also how they appear in the link attributes editor in the link module itself (accessed by right-clicking in a link module and selecting "Edit link"). However, when you treat the links as objects and loop through the link module in that manner, these attributes do return values.

So how do you retrieve the "object based" attributes from a link when looping through incoming or outgoing links? I can't simply say "Object o = l".

I will likely develop a similar skip list sort routine to get the output order that I want, but my inability to deduce the existing sort order prompted my to post my question.

Brad Porter
Ball Aerospace & Tech. Corp.
bporter@ball.com

Report this to a Moderator Report this to a Moderator
 21-Apr-2003 20:08
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Sutherland's code of looking at all "objects" in a "link module" will NOT find the links, it only finds the link-sets. That is, an "object" in a link module is a "link set". As far as I know there is no way (from a loaded linkset) to find all the links. You need to have a "for all links" loop insided a "for all objects" loop from a formal module.

Yup, it doesn't look like links are stored in create order; but I don't know what order they ARE stored in. I suspect they are in some sort of "unique ID" order, although the l."Absolute Number" returns nothing.

But just so this post has some useful content, I will add that you should not "delete" a link (nor even create a link) while inside a for link loop. If you find links you want to delete, put them in a skip list. When done with the loop delete the links in the skip.

- Louie
Report this to a Moderator Report this to a Moderator
 21-Apr-2003 21:20
User is offline View Users Profile Print this message


Michael Sutherland

Posts: 248
Joined: 13-Sep-2002

Louie,

Thanks for the correction. The code I posted loops through link sets in a link module, but does not get to the actual links.

-------------------------
Michael Sutherland
michael@galactic-solutions.com
http://galactic-solutions.com
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.