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: DXL script to sort & display incoming links by absolute number
Topic Summary:
Created On: 15-Sep-2004 20:07
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.
 15-Sep-2004 20:07
User is offline View Users Profile Print this message


mary gibbons

Posts: 27
Joined: 9-Oct-2002

Are there any DXL scripts available to sort and display incoming or outgoing links to an object within a formal module by Absolute Number of the links? There are DXL scripts to sort and display incoming links by object number. When there are multiple links to an object, these links are displayed in order of object number and the absolute numbers are not in any order. Would like a script to display multiple links to an object in sorted by Absolute Number.

Report this to a Moderator Report this to a Moderator
 17-Sep-2004 18:10
User is offline View Users Profile Print this message


Brian Azelborn

Posts: 36
Joined: 2-Dec-2002

If you have a layout DXL that sorts by object number, you can replace the object number with the absolute number and probably use the same script.

For instance:

If there is a line somewhere that reads something like:

s = (number o)

replace it with:

s = o."Absolute Number"

In this example, s would be the string that gets stored and sorted and o would be the object you are linked to. I hope this helps.

Brian Azelborn
Rockwell Collins
Report this to a Moderator Report this to a Moderator
 19-Sep-2004 10:00
User is offline View Users Profile Print this message


Asaf Kivity

Posts: 54
Joined: 25-Mar-2003

Hi,
I will be very intersted in the DXL script for sorting links by object number. do you think you can post it here, or send it to me by mail ?

Thanks,
Asaf.
Report this to a Moderator Report this to a Moderator
 28-Sep-2004 14:17
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

Edit your Layout DXL to put the text to be displayed in a skip list rather than displaying it immediately. Then loop through the skip list and display the entries. I would use a concatenation of module fullName for object number for the skip list key.



-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 28-Sep-2004 15:25
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

If your project policy features a strong module prefix policy they I'd use the Object Identifier as the Skip key.

On a side note: I haven't had luck retrieving stuff from a Skip List in any particular order, certainly NOT the order in which I put the information. I did write a retrieve-from-skip in the right order couple of functions, where it knows the key of the last retrieval and scans the entire Skip looking for the next key that is just "bigger" than the last one retrieved. It was clumsy but it worked.

Are you suggesting that the "for data in Skip loop" does it in some sort of order?

- Louie
Report this to a Moderator Report this to a Moderator
 28-Sep-2004 15:56
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

In my experience, the "for entry in skip list do ..." loop return entries ordered by key.

Note however that if you are storing absolute numbers or paragraph numbers as a string, then lexicographically "100" comes before "2", and "1.10" comes before "1.9", so you need to do some extra stuff like padding out the numbers with leading zeroes before using them.





-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 28-Sep-2004 17:23
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Writ a couple routines to pad the fields of a Paragraph Number with leading zeros, so it will sort correctly for reasons you suggest. Got a sibling UnPad function as well.

These should work for normal string versions of integers, such as "33".

- Louie
Report this to a Moderator Report this to a Moderator
 29-Sep-2004 10:23
User is offline View Users Profile Print this message


Asaf Kivity

Posts: 54
Joined: 25-Mar-2003

Sorry,
Was missing few lines.
don't mind this message.
Asaf.

Edited: 29-Sep-2004 at 10:36 by Asaf Kivity
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.