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: Accessing the Object Number value
Topic Summary:
Created On: 8-Sep-2003 18:45
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 Louie Landale, on Tuesday, September 9, 2003 5:03 PM

Answer:
There are 3 pieces of information about an object that are similar to "attributes" but are not. They are:

[1] the paragraph number e.g. "3.1.2.0-1". This represents the object's position in the hierarchy. Note that the position CHANGES depending on whether you are viewing deleted objects or not.

[2] Identifier e.g. "SMC_576". This is composed of the module's "prefix" (in this case "SMC_") and the object's "absolute number", in this case "576".

[3] Level "4". This represents the depth of the objects relative to its "parent".

Note that all of these 3 pieces of information can be changed without modifiying the objects itself, and that's why they are not true "attributes". The paragraph number and the level change when you move the object and the identifier changes when you modify the module's prefix. The DXL commands used to get this information are "identifier", "number", and "level".

Consider the following lines of code:

string AbsNo = o."Absolute Number" ""
string Prefix = module(o)."prefix"
string Id1 = Prefix AbsNo
string Id2 = identifier(o)
if (Id1 != Id2) then Louie has lost his mind
----------------------------------------
showDeletes(false) // I think I spelled the command correctly...
string ParaNumOff = number(o)
showDeletes(true)
string ParaNumOn = number(o)
if (ParaNumOff == ParaNumOn) then this object has no deleted preceding siblings nor parents, which is unlikely.
----------------------------------------
int LevelO = level(o)
int LevelP = level(previous(o))
if (LevelO == LevelP) then this object is "after" its older sibling
elseif (LevelO-1 == LevelP) then this object is "below" its parent
else either you got a DXL error since o has no "previous", or Louie has lost his mind.

Be advised that "number" has conficting meanings in the DXL and DOORS manuals; that's why I always use variable names like "ParaNo" when refering to the paragraph "number" as opposed to "AbsNo" when refering to the absolute "number".

- Louie
 8-Sep-2003 18:45
User is offline View Users Profile Print this message


Mary Miller

Posts: 36
Joined: 12-Sep-2002

Hello,

I am attempting to access the Object Number value. Do I have to go through the filter in order to do that? It doesn't seem like I can read the value as an attribute.

Ideas?

Thanks,

Mary
Report this to a Moderator Report this to a Moderator
 8-Sep-2003 19:05
User is offline View Users Profile Print this message


Cornelia Watson

Posts: 14
Joined: 12-Feb-2003

Mary, I'm assuming you're using DOORS 5.x or 6.x. If you mean *view* the object number, you can do that simply through creating a column showing *Object Number* as the attribute. However, you cannot edit the value. If you think my answer is unfathomable, have a look at what 6.0 Help says:

**************
If you are confused by the Object Number attribute

In DOORS 5.0 the terminology for object and section numbers was changed but this was not reflected in the name of the Object Number attribute.

The object number now means the number part of the object's unique identifier and the section number is the automatically generated heading number that shows the location of the object in the data hierarchy. For example, if an object's identifier is SOW89 and its heading number is 3.1.2.4, its object number is 89 and its section number is 3.1.2.4

However, the name of the Object Number attribute was not updated to reflect the new terminology. The Object Number attribute stores the section number, not the object number.

**************

Anyway, to my knowledge, the user interface does not allow change to an attribute accompanied by the eyeglasses symbol in the object properties attributes tab.

Best of luck,
c
Report this to a Moderator Report this to a Moderator
 8-Sep-2003 19:33
User is offline View Users Profile Print this message


Mary Miller

Posts: 36
Joined: 12-Sep-2002

Okay. Is there some code that will let you see the Object Number (not the Object ID)?

I tried doing this:

for o in m do
{
num = o."Object Number"
}

The problem is that I need to find a specific object number (ex: 4.1.1) so that I can set the child's attribute. Here is what I mean


SRS_12 Section 4.1
SRS_13 Some object text here Attribute set by dxl script here


Thanks!

Mary
Report this to a Moderator Report this to a Moderator
 8-Sep-2003 20:43
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Answer Answer
There are 3 pieces of information about an object that are similar to "attributes" but are not. They are:

[1] the paragraph number e.g. "3.1.2.0-1". This represents the object's position in the hierarchy. Note that the position CHANGES depending on whether you are viewing deleted objects or not.

[2] Identifier e.g. "SMC_576". This is composed of the module's "prefix" (in this case "SMC_") and the object's "absolute number", in this case "576".

[3] Level "4". This represents the depth of the objects relative to its "parent".

Note that all of these 3 pieces of information can be changed without modifiying the objects itself, and that's why they are not true "attributes". The paragraph number and the level change when you move the object and the identifier changes when you modify the module's prefix. The DXL commands used to get this information are "identifier", "number", and "level".

Consider the following lines of code:

string AbsNo = o."Absolute Number" ""
string Prefix = module(o)."prefix"
string Id1 = Prefix AbsNo
string Id2 = identifier(o)
if (Id1 != Id2) then Louie has lost his mind
----------------------------------------
showDeletes(false) // I think I spelled the command correctly...
string ParaNumOff = number(o)
showDeletes(true)
string ParaNumOn = number(o)
if (ParaNumOff == ParaNumOn) then this object has no deleted preceding siblings nor parents, which is unlikely.
----------------------------------------
int LevelO = level(o)
int LevelP = level(previous(o))
if (LevelO == LevelP) then this object is "after" its older sibling
elseif (LevelO-1 == LevelP) then this object is "below" its parent
else either you got a DXL error since o has no "previous", or Louie has lost his mind.

Be advised that "number" has conficting meanings in the DXL and DOORS manuals; that's why I always use variable names like "ParaNo" when refering to the paragraph "number" as opposed to "AbsNo" when refering to the absolute "number".

- Louie
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.