Mike,

in Rose, the type types are stored as string.
The only way to get to the qualified name is by searching
the whole rose model.

As the type infos are only referring to classes, you can
use the 
  Model.GetAllClasses() 
operation to retrieve a complete list of all classes in your model.

Then, you can use the 
  Collection.FindFirst and .FindNext 
operations to seek your class. This class then 
can give you the qualified name with
  class.GetQualifiedName().

If you need to replace the double colons :: with dots,
you can use the Item$ and ItemCount Routines from SummitBasic
to traverse the list of packages in the Qualified name string.

Best regards,
Volker

-----Ursprungliche Nachricht-----
Von: Mike Murray [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 7. Juni 2001 14:57
An: Ziosi, Lara
Cc: rose_forum
Betreff: Re: (ROSE) REI: Qualified Type (quidu)



Thanks for the response, but unless I am missing something, that is not what
I need.

For example, if I have the following attribute:
    name : String

My goal is to determine the qualified name of the String type.  That is,
java::lang::String, or java.lang.String.

Through REI, I can:
    Dim name_attribute As Attribute
    Dim type_name As String

    set name_attribute = ...
    type_name = name_attribute.Type    '  But I want the qualified name of
the type, not the simple name

If there a method which will enable me to get the Type as a class?  Or is,
there a method which will enable me to get the uid (which is stored in the
attribute as quidu) for the Type?

Thanks

PS - I know that I could do a Model search for the String type by name, but
it returns a collection.  I want to search on its uid, so that I get a
unique class.

"Ziosi, Lara" wrote:

> Hello Mike,
>
> You can get both the qualified name and the Unique ID of anything which
> inherits from Element, e.g. a Class:
>
> Dim thename as string, thequid as string
> dim theclass as class
> set theclass = ...
>
> thename = theclass.getqualifiedname()
> thequid = theclass.getuniqueid()
>
> See the online help on 'Element Class Overview' from the Help Index for
> more information. When you look up a particular REI class, such as
> 'operation' or 'attribute' or 'parameter', you'll be able to see whether
> it inherits from Element (all the above do).
>
> Thank you and regards, Lara
>
> > -----Original Message-----
> > From: Mike Murray [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, June 05, 2001 11:31 PM
> > To: rose_forum
> > Subject: (ROSE) REI: Qualified Type (quidu)
> >
> >
> > I would like to get the qualified type for attributes, operation
> parameters, and operation return types.
> >
> > Does anyone know if there is a way to do this?
> >
> > Is there a method that provides access to the quidu?  If I could get the
> quidu for the above mentioned elements, I think I could use that in
> conjunction with Model.FindClassWithID to obtain the class for the type,
> and go from there.
> >
> > Thanks

Mike Murray                 mailto:[EMAIL PROTECTED]
Windchill Core Development  http://www.ptc.com/windchill
PTC


************************************************************************
* Rose Forum is a public venue for ideas and discussions.
* For technical support, visit http://www.rational.com/support
*
* Admin.Subscription Requests: [EMAIL PROTECTED]
* Archive of messages:
http://www.rational.com/products/rose/usergroups/rose_forum.jtmpl
* Other Requests: [EMAIL PROTECTED]
*
* To unsubscribe from the list, please send email
*
* To: [EMAIL PROTECTED]
* Subject:<BLANK>
* Body: unsubscribe rose_forum
*
*************************************************************************
************************************************************************
* Rose Forum is a public venue for ideas and discussions.
* For technical support, visit http://www.rational.com/support
*
* Admin.Subscription Requests: [EMAIL PROTECTED]
* Archive of messages: 
http://www.rational.com/products/rose/usergroups/rose_forum.jtmpl
* Other Requests: [EMAIL PROTECTED]
*
* To unsubscribe from the list, please send email
*
* To: [EMAIL PROTECTED]
* Subject:<BLANK>
* Body: unsubscribe rose_forum
*
*************************************************************************

Reply via email to