Hi folks, Module mod = current AttrDef ad string as ="" for ad in mod do { as=ad.name print mod.as "\n" } Edward_Wang - Tue Mar 22 02:33:34 EDT 2011 |
Re: How to print out all the module attributes' values by DXL? Is there any different between them and other attributes? Edward |
Re: How to print out all the module attributes' values by DXL? Edward_Wang - Tue Mar 22 02:47:19 EDT 2011
Some attributes are defined for module, some for objects and some for both module and objects. The attribute "Absolute Number" is defined only for objects. So, if you want to print module attributes, you have to check for that in your code: Module mod = current AttrDef ad string as ="" for ad in mod do { if (ad.module) { as=ad.name print as ": " mod.as "\n" } } |
Re: How to print out all the module attributes' values by DXL? SystemAdmin - Tue Mar 22 03:03:09 EDT 2011
Some attributes are defined for module, some for objects and some for both module and objects. The attribute "Absolute Number" is defined only for objects. So, if you want to print module attributes, you have to check for that in your code: Module mod = current AttrDef ad string as ="" for ad in mod do { if (ad.module) { as=ad.name print as ": " mod.as "\n" } } Thank you very much. I know my mistake. And very try again. Edward |
Re: How to print out all the module attributes' values by DXL? Edward_Wang - Tue Mar 22 03:38:00 EDT 2011 If I want to get the attributes' value list which scope is object, what should I do? Can you give me some clue? |
Re: How to print out all the module attributes' values by DXL? Edward_Wang - Tue Mar 22 05:32:16 EDT 2011 Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS |
Re: How to print out all the module attributes' values by DXL? Edward_Wang - Tue Mar 22 05:32:16 EDT 2011 |
Re: How to print out all the module attributes' values by DXL? Mathias Mamsch - Tue Mar 22 05:36:20 EDT 2011 Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
Hi Mathias, Module mod =current AttrDef ad string as="" for ad in mod do { if(ad.module) { as=ad.name print mod.as "\n" //print out all the values of module attributes } if(ad.object) { as=ad.name print ??? //How to print out all the values of object attributes? } } |
Re: How to print out all the module attributes' values by DXL? Edward_Wang - Wed Mar 23 01:05:06 EDT 2011
Hi Mathias, Module mod =current AttrDef ad string as="" for ad in mod do { if(ad.module) { as=ad.name print mod.as "\n" //print out all the values of module attributes } if(ad.object) { as=ad.name print ??? //How to print out all the values of object attributes? } } Please pay attention, the module is a Link Module. It's not a Formal Module. Really need your help. Thanks and regards. Edward. |
Re: How to print out all the module attributes' values by DXL? Edward_Wang - Wed Mar 23 01:07:34 EDT 2011
You should know that the "objects" of Link Module are the Linksets. So you can do as with every formal Module, there is really no difference: Module myLinkModule = current Object o AttrDef ad for ad in myLinkModule do { if (ad.module) { string sAttrName = ad.name print "Module Attribute: " sAttrName " -> " (myLinkModule.sAttrName) "\n" } } for o in myLinkModule do { for ad in myLinkModule do { string sAttrName = ad.name if (ad.object) { print "Attribute:" sAttrName " -> " o.sAttrName "\n" } Linkset LS = linkset o // use this if you prefer to use Linkset objects } }
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
|
Re: How to print out all the module attributes' values by DXL? Edward_Wang - Wed Mar 23 01:05:06 EDT 2011
Hi Mathias, Module mod =current AttrDef ad string as="" for ad in mod do { if(ad.module) { as=ad.name print mod.as "\n" //print out all the values of module attributes } if(ad.object) { as=ad.name print ??? //How to print out all the values of object attributes? } }
I wonder if this will help. As Mathias said an 'Object' in a link module corresponds to a 'LinkSet'. There are attributes in a link module and you can create your own custom ones. Module myLinkModule = current Object o AttrDef ad //for ad in myLinkModule do { // if (ad.module) { // string sAttrName = ad.name // print "Module Attribute: " sAttrName " -> " (myLinkModule.sAttrName) "\n" // } //} // Print Attr-Name Headings print "ObjID" for ad in myLinkModule do { string sAttrName = ad.name if (ad.object) { print "\t" sAttrName } } print "\n" for o in myLinkModule do { print identifier(o) for ad in myLinkModule do { string sAttrName = ad.name if (ad.object) { print "\t" o.sAttrName ""} //Linkset LS = linkset o // use this if you prefer to use Linkset objects } print "\n" }
|
Re: How to print out all the module attributes' values by DXL? llandale - Wed Mar 23 10:50:23 EDT 2011
I wonder if this will help. As Mathias said an 'Object' in a link module corresponds to a 'LinkSet'. There are attributes in a link module and you can create your own custom ones. Module myLinkModule = current Object o AttrDef ad //for ad in myLinkModule do { // if (ad.module) { // string sAttrName = ad.name // print "Module Attribute: " sAttrName " -> " (myLinkModule.sAttrName) "\n" // } //} // Print Attr-Name Headings print "ObjID" for ad in myLinkModule do { string sAttrName = ad.name if (ad.object) { print "\t" sAttrName } } print "\n" for o in myLinkModule do { print identifier(o) for ad in myLinkModule do { string sAttrName = ad.name if (ad.object) { print "\t" o.sAttrName ""} //Linkset LS = linkset o // use this if you prefer to use Linkset objects } print "\n" }
|
Re: How to print out all the module attributes' values by DXL? SystemAdmin - Tue Mar 22 03:03:09 EDT 2011
Some attributes are defined for module, some for objects and some for both module and objects. The attribute "Absolute Number" is defined only for objects. So, if you want to print module attributes, you have to check for that in your code: Module mod = current AttrDef ad string as ="" for ad in mod do { if (ad.module) { as=ad.name print as ": " mod.as "\n" } } Hi, i am getting below error while running a dxl script. 3.dxl:876> unknown Object attribute (Table_ID_Copy) could you please explain the error. Thanks in advance. Ravikiran |
Re: How to print out all the module attributes' values by DXL? ravikiran.Talekar - Wed Sep 03 01:25:04 EDT 2014 Hi, i am getting below error while running a dxl script. 3.dxl:876> unknown Object attribute (Table_ID_Copy) could you please explain the error. Thanks in advance. Ravikiran It means you have a script which deals with a certain module and for one of the objects of this module your script wants to get the value of the attribute "Table_ID_Copy". But the module that is opened does not contain the attribute "Table_ID_Copy".
So, either your module has the wrong structure or your script has the wrong list of attributes to be retrieved. |
Re: How to print out all the module attributes' values by DXL? ravikiran.Talekar - Wed Sep 03 01:25:04 EDT 2014 Hi, i am getting below error while running a dxl script. 3.dxl:876> unknown Object attribute (Table_ID_Copy) could you please explain the error. Thanks in advance. Ravikiran Edit that attribute you will find it is defined for the "module" but not for "objects"; or it doesn't exist at all. |
Re: How to print out all the module attributes' values by DXL? llandale - Wed Sep 03 14:15:25 EDT 2014 Edit that attribute you will find it is defined for the "module" but not for "objects"; or it doesn't exist at all. Thank you Mike and llandale, You guys were right, i added the value, its working now. Thanks a lot. |
Re: How to print out all the module attributes' values by DXL? OLE object disabled in DOORS. Hoe can i fix this. I need to inseret OLE Object in the module |