Hello Marcel,
In REI, Attribute class has a property named Type which indicates the data type of the attribute. This value is however a String. There are instances when an attribute's type may be a class and is necessary to retrieve that class. To determine if the attribute's type is a class and to retrieve that class, use the Attribute class' GetTypeClass() method. This method returns a null value if the attribute's type is not a class. If however the attribute's type is a class, the method returns a reference to that class. Attached please find a sample script that lists all attributes in the model whose type is another class. The return value of GetTypeClass is a Rose Class and you can use the ParentCategory property to retrieve the parent package.
Cordially,
Oktay Amiry
Rose Technical Support
Rational Customer Service
Committed to Service Excellence
SCP Certified: http://www.rational.com/support/scp.jsp
Rational Software
the Software Development company
http://eservice.rational.com/eservice/
> -----Original Message-----
> From: Marcel Straka [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 12, 2002 4:44 AM
> To: [EMAIL PROTECTED]
> Subject: (ROSE) Attribute type problem
>
>
>
> Hello to all!
>
> I'm writing customized generator from Rose model into XML
> file using Rose
> Script. I have a problem with Type property of Attribute
> object. When an
> attribute in some modeled class is of some other modeled
> class type, I get
> only the name of that class without package in RoseScript. So
> I don't know
> how to get parent package of class and even how to find out that an
> attribute is of class type.
> I've found in mdl file that there is 'quidu' property linking
> attribute
> object with class representing its type but this property
> seems inaccessible
> from RoseScript.
>
> Can anybody help me?
> Thanks a lot!
> Marcel Straka
> **************************************************************
> **********
> * Rose Forum is a public venue for ideas and discussions.
> * For technical support, visit http://www.rational.com/support
> *
> * Post or Reply to: [EMAIL PROTECTED]
> * Subscription Requests: [EMAIL PROTECTED]
> * Archive of messages:
> * http://www.rational.com/support/usergroups/rose/rose_forum.jsp
> * Other Requests: [EMAIL PROTECTED]
> *
> * To unsubscribe from the list, please send email
> * To: [EMAIL PROTECTED]
> * Subject: <BLANK>
> * Body: unsubscribe rose_forum
> **************************************************************
> ***********
>
