Gosh, I would be worried editing the underlying PTL
file like this. Using a Rose Script might be safer bet.
Unfortunately, I don't have access to Rose at this
time, but have used this script extensively. To run,
just open Rose, goto Tools-Open Script and run this.
You will need to customize certain areas of the script
to suit your needs in this particular case, but this
script serves as a generic one that can add a tab to
anything in Rose.
Would suggest you test it out on a dummy model before
you execute it against the real model. You only have to
do this one time and the settings will be in place.
Here is the script:
----- Begins Here
Const gTabName$ = "Class Attr Spec"
Const gRoseElement = "Attribute"
Sub Main
Dim defProps As DefaultModelProperties
Set defProps =
RoseApp.CurrentModel.DefaultProperties
'AddDefaultProperty will create the tab with
the name of gTabName$ specified (Spec) if it
'does not already exist
' First change the value for gTabName$ to be
the title of the tab in the Attribute Specification
Dialog in Rose
' Change the following statements to reflect
the new properties or fields you wish to display on
this new tab
' The following demonstrates how to build a
property of each main type: Text, Integer, Floating
number, Boolean.
' Rose also provides the ability to provide a
specific list of values for a property via an
enumerated type.
' One first builds the type with the valid list
of values, then creates a property of that custom
enumerated type.
' These Rose Script statements build sample
entry fields of each type. Args to the function is as
follows:
' Arg1 = the Rose element you wish to add
the property to. In this case, Class Attribute
' Other cases would be Class,
Operation, Use Case
' Arg2 = name of the tab
' Arg3 = name of the property set....just
leave this at default
' Arg4 = name of the property. This will
appear as the label for the property in the tab
' Arg5 = data type of the property
' Arg6 = default data value for the property
worked = defProps.AddDefaultProperty
(gRoseElement , gTabName$, "default","Text
Prop", "Text", "")
worked = defProps.AddDefaultProperty
(gRoseElement , gTabName$, "default", "Integer
Prop", "Integer", "0")
worked = defProps.AddDefaultProperty
(gRoseElement , gTabName$, "default", "Float
Prop", "Float", "0.00")
worked = defProps.AddDefaultProperty
(gRoseElement , gTabName$, "default", "Boolean
Prop", "Boolean", "True")
' Here we build a property that gets its value
from an enumerated list presented as a drop down list
box
worked = defProps.AddDefaultProperty
(gRoseElement ,
gTabName$, "default", "MyNewEnumeration", "Enumeration",
"Value1,Value2,Value3")
worked = defProps.AddDefaultProperty
(gRoseElement , gTabName$, "default", "Prop Using
Select List", "MyNewEnumeration", "Value1")
End Sub
----- Ends Here
************************************************************************
* Rose Forum is a public venue for ideas and discussions.
* For technical support, visit http://www.rational.com/support
* Only plain-text messages are supported.
* HTML or Rich-Text messages may be rejected.
*
* 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
*************************************************************************