I'm trying to get the value of a parameter in an instantiated class. The
line "x = objPrm.OpenSpecification" opens the correct parameter on the
screen but none of the documented methods (Type, Const, Init value) seem to
work.

Thanks for any help.

Sub Main
    Dim objCat As Category
    Dim objCls As Class
    Dim colCls As ClassCollection
    Dim colPrms As ParameterCollection
    Dim objPrm As Parameter
      Dim ptype As String

   viewport.open
    viewport.clear


    Set colCls = RoseApp.CurrentModel.GetAllClassesEx(True, True)
    For i = 2 To 5 ' colCls.Count
        Set objCls = colCls.GetAt(i)
        Set colPrms = objCls.Parameters
            objPrmID = colPrms.FindFirst("ScriptState")

            Set objPrm = colPrms.GetAt(objPrmID)
            Print objCls.Name

   '         x = objPrm.OpenSpecification
            x =   objPrm.Type
      ' ptype = objPrm.InitValue
            Print objCls.Name
       '    Print ptype
    Next i



End Sub


Mark Hampshire
                                                 
 Knowledge Engineering,    Location    263 E3000 
 TCC                                       S2E11 
                                                 
 800 Chrysler Drive        Tie Line     754-0818 
                                                 
                                                 
 Auburn Hills, MI 48326    Phone           (248) 
                                        944-0818 
                                                 
 CIMS 483-01-13            Fax             (248) 
                                        576-2185 
                                                 






****************************************************************************

The information contained in this transmission, which may be
confidential and proprietary, is only for the intended recipients.
Unauthorized use is strictly prohibited. If you receive this
transmission in error, please notify me immediately by telephone
or electronic mail and confirm that you deleted this transmission
and the reply from your electronic mail system.
****************************************************************************




************************************************************************
* 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