Try the following to print the type name for packages.
Sub Main
Dim allPackages As CategoryCollection
Dim thePackage As Category
viewport.open
Set allPackages = RoseApp.CurrentModel.GetAllCategories ()
For i = 1 To allPackages.count
Set thePackage = allPackages.getAt (i)
Print thePackage.name; " is a <";
thePackage.GetPropertyClassName; ">"
Next
End Sub
You'd need to look at the packages' contents and see the types of those
model elements and so on.
This is too much work, though, just to find out what types you have. If you
stuck to the name of the object, I don't think you'd go wrong.
So:
worked = defProps.AddDefaultProperty("Class", "Extra",
worked = defProps.AddDefaultProperty("Attribute", "Extra",
worked = defProps.AddDefaultProperty("Association", "Extra",
worked = defProps.AddDefaultProperty("Category", "Extra",
And so on.
I thought you were asking what the available types were, weren't you? Maybe
I misunderstood your original question?
H�seyin
Karabash Ltd.
www.karabash.co.uk
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: 27 February 2002 13:30
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: RE: AW: (ROSE) PRE and POST conditions
>
>
> Hi,
>
> > Element.GetPropertyClassName will give you the type for the
> > model element
> > you are working on.
>
> Can you give me an example of a script that uses this
> function? And how do I
> use that script. I should have the element selected in the browser?
>
> Greetings,
> Arno Leenders
> -----------------------------------------------------------------
> ATTENTION:
> No legal consequences can be derived from the content of this
> e-mail and/or its attachments. Neither is sender committed to
> these. The content of this e-mail is exclusively intended for
> addressee(s) and information purposes. Should you receive this
> message by mistake, you are hereby notified that any disclosure,
> reproduction, distribution or use of this message is strictly
> prohibited. Sender accepts no liability for any damage resulting
> from the use and/or acceptation of the content of this e-mail.
> Always scan attachments for viruses before opening them.
> -----------------------------------------------------------------
>
This private and confidential e-mail has been sent to you by Egg.
The Egg group of companies comprises Prudential Banking plc
(registered no. 2999842), Egg Financial Products Ltd (registered
no. 3319027) and Egg Investments Ltd (registered no. 3403963) which
carries out investment business on behalf of Egg and is regulated
by the Financial Services Authority. All members of the Egg group
are registered in England and Wales. Registered offices: 142
Holborn Bars, London EC1N 2NH
If you are not the intended recipient of this e-mail and have
received it in error, please notify the sender by replying with
'received in error' as the subject and then delete it from your
mailbox.
************************************************************************
* 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
*************************************************************************