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: Absolute Number Assignment Reversed?
Topic Summary: Absolute Numbers for objects created in a loop are in descending order?
Created On: 2-Jan-2008 21:34
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 William Wells, on Wednesday, January 2, 2008 9:56 PM

Answer:
THANKS!
 2-Jan-2008 21:34
User is offline View Users Profile Print this message


William Wells

Posts: 5
Joined: 10-Oct-2007

Hi folks,

I've only recently started using DOORS and DXL, this is my first post.

Suppose you start with fresh module, and you use a simple loop to create some objects,

Module mod = current
Object NewOb

for(z=0; z<10; z++)
{
NewOb = create(mod)
}


Ten objects will be created where the first object's ABS# is 10, the second object's ABS# is 9 and so on down the the last object getting the ABS# of 1.

Does anyone know of a way to have the ABS#s ascend instead of descend in this type of scenario? I tried using "create before" and saw no difference...

I recognize that absolute numbers are just unique IDs for DOORS' internal use and I acknowledge the warning: "... it is a bad idea to attempt to keep module "tidy" by having sequential identifiers - i have seen this many times and it always ends in tears."-Tony Goodman

Thanks to all, especially the regular repliers whose answers and advice have helped a ton as I get to know DOORS all too well!

Will
Report this to a Moderator Report this to a Moderator
 2-Jan-2008 21:50
User is offline View Users Profile Print this message


Octavian Stanescu

Posts: 39
Joined: 28-Feb-2005

Use "create last"
Report this to a Moderator Report this to a Moderator
 2-Jan-2008 21:56
User is offline View Users Profile Print this message


William Wells

Posts: 5
Joined: 10-Oct-2007

Answer Answer
THANKS!
Report this to a Moderator Report this to a Moderator
 3-Jan-2008 17:18
User is offline View Users Profile Print this message


Chris Jones

Posts: 177
Joined: 1-Jul-2005

Yes, exactly. "create(mod)" creates the first object in mod; "any existing objects at level 1 are moved after the new object". You could also make the new objects after the old one:

Module mod = current
Object NewOb
NewOb = create(mod)
for(z=1; z<10; z++)
{
NewOb = create(after(NewOb))
}

Have fun learning!
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.