In a Rose model, tables are essentially classes. One can therefore add
custom property to tables (i.e., classes). However the Data Modeler
specification dialogs can not be customized and no tab page can be added
using for example the REI CreateDefaultPropertySet method. For example,
assume that there is a table named T_0 in the model. The following script
will run correctly, adding a tab page to classes in the model and the
property to the table T_0. However, opening the specification dialog for the
table will not display the tab page that was added. The property values will
thus need to be added and retrieved using REI scripting facility.

Const ToolName As String = "toolName"
Const PropertyName As String = "PropertyFoo"

Sub Main
    Dim theClass As Class
    Dim theModel As Model
    Dim props As DefaultModelProperties
    Dim theProperty As Property
    
    Set theClass = roseApp.CurrentModel.GetAllClasses.GetFirst("T_0")
    If theClass Is Nothing Then
          MsgBox "Table T_0 could not be found."
          Exit Sub
    End If
    
    Set theModel = roseApp.CurrentModel
    Set props = theModel.DefaultProperties

    If Not props.CreateDefaultPropertySet(theClass.GetPropertyClassName,
ToolName, "default") Then
       MsgBox "Failed to create new tab for table."
    End If

    If Not props.AddDefaultProperty(theClass.GetPropertyClassName, ToolName,
"default", PropertyName, "String", "Hello World!") Then
        MsgBox "Failed to create new property for an table."
    End If
    
    Set theProperty = theClass.FindProperty(ToolName, PropertyName)
        
    If Not theProperty Is Nothing Then
        MsgBox "Table T_0 has a property named " & _
        theProperty.Name & " " & "Value: " & theProperty.Value
    End If
        
End Sub

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: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 27, 2002 6:10 AM
> To: [EMAIL PROTECTED]
> Subject: (ROSE) add optional attributes to the table specification
> within data modeler
> 
> 
> 
> hi,
> 
> I designed some tables using DataModeler in Rose. For 
> optional informations
> we need an additional tab with some attributes within the table
> specification. Is there any way to modify the DataModeler ?
> 
> 
> 
> GILLARDON AG financial software
> Pettenkoferstra�e 33
> D - 80336 M�nchen
> 
> Dipl. Inform. Thomas Rabaschus
> Tel. 089 - 53 88 69 69
> [EMAIL PROTECTED]
> 
> www.gillardon.de
> 
> 
> **************************************************************
> **********
> * 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
> **************************************************************
> ***********
> 
************************************************************************
* 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
*************************************************************************

Reply via email to