![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Unable to extract ALL Attributes names from Module Topic Summary: Some attributes do not show up via the for AttrDef in loop. Created On: 26-Jun-2007 22:03 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: EXCELLENT!!!. I had some legacy code in which STRING was used instead of ATTRDEF. Need to brush up on the latest docs. THANKS. | |
![]() |
|
The only way I know how to display all the attributes in a module is:
string aAttrName Module mm = current for aAttrName in mm do { print "attribute name =" aAttrName "\n" } However, I have a module where I can not extract all the attributes I can see via "Edit->Attributes". The only things in common with the "stubborn" attributes are: 1. They are all Module-level Attributes. (none are Object Level attributes) 2. They are all User-Generated. (not built-in system attributes) 3. They can be modified but the code above refuses to list them. The really crazy thing is that I can do... AttrDef ad = find(current Module, "NameOfStubbornAttribute") AND IT RETURN THE RIGHT ATTRIBUTE OBJECT!!!!!!! I am totally clueless on this one. |
|
![]() |
|
![]() |
|
You are correct. Module level attributes won't show in that loop since its a loop for object level attributes. You can use
AttrDef ad for ad in current Module do { print ad.name "\n" } for a more complete listing. However, things like Object Identifier, Object Level, and Object Number still won't show. ------------------------- David Pechacek AAI Services Textron dpechacek@sc-aaicorp.com David.Pechacek@gmail.com |
|
![]() |
|
![]() |
|
Alternative, if you don't what to use AttrDefs.
The word attributes forces the loop to return module attributes rather than object attributes. Module m = current string attr = "" for attr in attributes m do { print(attr " = " m.attr "\n") } ------------------------- Tony Goodman http://www.smartdxl.com |
|
![]() |
|
![]() |
|
EXCELLENT!!!.
I had some legacy code in which STRING was used instead of ATTRDEF. Need to brush up on the latest docs. THANKS. |
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.