![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Can you SET DXL code in a AttributeDXL programmatically? Topic Summary: Setting DXL code in a AttributeDXL Created On: 3-Oct-2006 19:19 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: Dan, I think you got the function prototype wrong. I can see why - hte help is very misleading. Usage is as folows: AttrDef ad string dxlString = "obj.attrDXLName = \"hello\"" ad = modify(ad, setDXL, dxlString) | |
![]() |
|
I can print the DXL code associated with a DXL_attribute (see following DXL) however I have not
been able to SET the value of ad.dxl (I tried string, buffer???). Does anybody know how to SET a DXL_attribute to a user specified DXL code? Thanks, Dan ------------------------ // The following prints the DXL code associated with a specific DXL_attribute Module m = current string attrName = "MyAttrDXL" AttrDef ad for ad in m do { if (ad.dxl) { string dxlName = ad.name if (dxlName == attrName) { print dxlName "\n" string dxlVal = ad.dxl print dxlVal "\n" } } } |
|
![]() |
|
![]() |
|
Try something like:
AttrDef ad = create object type "Integer" attribute "cost" dxl "int i = 10 \n obj.attrDXLName = i " |
|
![]() |
|
![]() |
|
Why use so few words when you can go on for paragraph after paragraph like I do?
|
|
![]() |
|
![]() |
|
Ron,
Thank you for the answer to my question. You, in fact, answered my question very well. I just asked the wrong question. I am actually trying to MODIFY the DXL code in an existing DXL_Attribute. The construct to modify a DXL is (from DXL Help): AttrDef modify(AttrDef old, [setproperty value,] AttrDef new) the setproperty value is setDXL I have used this to Modify attribute History, Default values, Hidden etc... but never successfully to modify attribute DXL code? I have tried various combos for the AttrDef old and new but with little success. Has anyone used modify(AttrDef old, [setproperty value,] AttrDef new) to successfully modify text attributes successfully? Thank you Again, Dan |
|
![]() |
|
![]() |
|
Dan, I think you got the function prototype wrong.
I can see why - hte help is very misleading. Usage is as folows: AttrDef ad string dxlString = "obj.attrDXLName = \"hello\"" ad = modify(ad, setDXL, dxlString) ------------------------- Tony Goodman http://www.smartdxl.com |
|
![]() |
|
![]() |
|
Arrrrrggggg!
I actually tried this first thing and had a singe silly error in my string that caused it to fail. That's when I really studied the docs and found the misguided Doors Help directions. THANK YOU! Dan |
|
![]() |
|
![]() |
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.