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: Sort outlinks
Topic Summary:
Created On: 13-Nov-2003 16:46
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 Paul Franz, on Monday, December 1, 2003 7:39 PM

Answer:
Thanks for all who responded.

In retrospect, I believe that what I really need is a way to sort by paragraph number as Tony Goodman pointed out. A better way would be to allow users to select the order of the links in the properties of an object. Currently, the order seems to be the order that the links were created. This is all right, but, if you go back and add a link that is not is proper sequence, there is no way to adjust the order other that to delete all of the links and re-link them. Reassigning the links is no fun if you have many objects with many links.

I will try to get a DXL script to sort by paragraph number based on Tony's suggestion.

Thanks again,
Paul.
 13-Nov-2003 16:46
User is offline View Users Profile Print this message


Paul Franz

Posts: 15
Joined: 28-Oct-2003

Hello,

I have added a column to a view that shows any linked modules and objects. Is there any way to sort the objects by object ID? I have customized the example outlink layout to add additional attributes, but, would like to control the sort. Currently, I do not see the same Object ID sort in the column each time I open the view, sometimes Object IDs are sorted in ascending order (preferred), and sometimes the Object IDs are sorted in decending order (not preferred).

Thanks,
Paul.
Report this to a Moderator Report this to a Moderator
 13-Nov-2003 17:37
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

I've never figured out the "order" of links but had suspected (apparently incorrectly) they are in link-create order.

Anyway consider the attached psuedo code.

- Louie
Report this to a Moderator Report this to a Moderator
 13-Nov-2003 22:12
User is offline View Users Profile Print this message


Brody Neilans

Posts: 2
Joined: 13-Nov-2003

Is there some dxl code out there that sorts by Object Number (for example 3.12.5.9-3)? I would like to have that column of links sorted by the order in which they appear in thier own module. The only way I see this happening is using there Object Number attribute. It seems like it is possible, just not very fun so that is why I am checking.

Thanks,
Brody
Report this to a Moderator Report this to a Moderator
 13-Nov-2003 22:54
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

The reality here is that "3.2" will sort AFTER "3.10" because "2" is greater than "1" lexigraphically even though "2" is less than "10".

To make a good sort, you'll need to pad the entries between the "." and "-" with zeros" "003.002" and "003.012", sort it, then unpad the zeros.

Another way to do this is as follows:
o get a list of all the desired target objects you want to display.
o turn off sorting etc. in the target module. Notice that objects are now already "sorted" by Paragraph ID: top to bottom.
o Now for every object in the entire target module:
o if this object is one you want to display then remove
if from the desired display list and put it in the ToBeDisplayed list.
o The Desired List could be a Skip while the ToBe list an actual list.

- Louie
Report this to a Moderator Report this to a Moderator
 14-Nov-2003 08:53
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

The attached may help.
There are two functions here, onr takes an Object as a parameter, the other takes the paragraph number, they both return the object paragraph number padded with zeroes.


-------------------------
Tony Goodman
http://www.smartdxl.com

Edited: 14-Nov-2003 at 08:56 by Tony Goodman
Report this to a Moderator Report this to a Moderator
 1-Dec-2003 19:39
User is offline View Users Profile Print this message


Paul Franz

Posts: 15
Joined: 28-Oct-2003

Answer Answer
Thanks for all who responded.

In retrospect, I believe that what I really need is a way to sort by paragraph number as Tony Goodman pointed out. A better way would be to allow users to select the order of the links in the properties of an object. Currently, the order seems to be the order that the links were created. This is all right, but, if you go back and add a link that is not is proper sequence, there is no way to adjust the order other that to delete all of the links and re-link them. Reassigning the links is no fun if you have many objects with many links.

I will try to get a DXL script to sort by paragraph number based on Tony's suggestion.

Thanks again,
Paul.
Report this to a Moderator Report this to a Moderator
 1-Dec-2003 20:02
User is offline View Users Profile Print this message


Brody Neilans

Posts: 2
Joined: 13-Nov-2003

Attached is what I did to sort the out links by paragraph number using Louie's suggestion of turning off sorting in the target module combined with auto generated code from DOORS Analysis wizard. I made it Attribute DXL so it would run faster. It seems to work correctly and looks alot better. Thanks for the suggestions also...

-Brody

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.