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: get name of attribute dxl attribute
Topic Summary:
Created On: 8-Aug-2007 18: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 Al Lione, on Thursday, August 9, 2007 3:49 PM

Answer:
Saved by the bell, or in this case, saved by Louie! I thought I had to assign a value to attrDXLName, but it automatically takes on its own attribute name as a string, which is also the name of the enumeration value I need to search for.... problem solved, and I had it right all along :-)
 8-Aug-2007 18:34
User is offline View Users Profile Print this message


Al Lione

Posts: 59
Joined: 13-Jul-2004

Is there a way, within attribute dxl, to capture the actual name of the attribute?

Something like:

obj.attrDXLName = name of this attribute

The module with my source links has an enumeration attribute with 11 values, and my target module has 11 dxl attributes that correspond to the names of the enumeration values. For each attribute, I pull in information from the linked module that matches the enumeration value. The code for each dxl attribute is identical except for the line mentioned above, where I have to manually insert the attribute.
If I could somehow capture the attribute name, in the same way that I can use "name current Module" to get a module name, it would save me lots of grief.
Report this to a Moderator Report this to a Moderator
 8-Aug-2007 18:53
User is offline View Users Profile Print this message


Reik Schroeder

Posts: 361
Joined: 28-Jul-2003

Hi Al,
the answer to your question is in your question:
attrDXLName

is the name of attribute as string, so you can use something like this:

obj.attrDXLName = otherObject.attrDXLName""

Greetings
Reik

-------------------------
Evosoft GmbH
for Siemens Industry Sector


Berlin, Germany
Report this to a Moderator Report this to a Moderator
 8-Aug-2007 21:38
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Yes, constant 'attrDXLName' has the name of the attribute DXL when run from inside attr DXL, and is null in all other contexts.

I think you are doing something like this:
oOther = linked object

if (isMember(oOther.NameEnumAttr, attrDXLName))
{ // oOther is of interest to this attribute DXL
obj.attrDXLName = gathered info about oOther
}

- Louie

Try running the following from a DXL windows, you'll get no error but won't get any results either:
print "<" attrDXLName ">\n"
Report this to a Moderator Report this to a Moderator
 9-Aug-2007 15:49
User is offline View Users Profile Print this message


Al Lione

Posts: 59
Joined: 13-Jul-2004

Answer Answer
Saved by the bell, or in this case, saved by Louie! I thought I had to assign a value to attrDXLName, but it automatically takes on its own attribute name as a string, which is also the name of the enumeration value I need to search for.... problem solved, and I had it right all along :-)
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 2 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 2 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.