'<> 'Annamalai "Vishu" Viswanathan '12/7/99 'This script can be used to add in, out or inout descriptors to operation parameters 'or change the in, out or inout parameters already assigned to operation parameters 'for the purposes of IDL generation in Rose Sub Main Begin Dialog DescDialog ,,180,151,"Set Parameter Descriptors" OKButton 132,8,40,14 CancelButton 132,28,40,14 OptionGroup .OptionGroup1 OptionButton 16,22,50,8,"in",.in OptionButton 16,34,50,8,"out",.out OptionButton 16,46,50,8,"inout",.inout GroupBox 4,12,52,44,"Descriptor",.GroupBox1 Text 20,98,56,8,"Parameter Name:",.Text1 Text 20,119,52,8,"Parameter Type:",.Text2 TextBox 20,76,132,12,.OpName TextBox 76,96,76,12,.ParamName TextBox 76,116,76,12,.ParamType End Dialog Dim MyDialog As DescDialog Dim selClasses As ClassCollection Dim aClass As Class Dim ops As OperationCollection Dim op As Operation Dim params As ParameterCollection Dim param As Parameter Dim PreType As String Dim PostType As String Dim DescStr1 As String Set selClasses = RoseApp.CurrentModel.GetSelectedClasses() For i = 1 To selClasses.Count Set aClass = selClasses.GetAt(i) Set ops = aClass.Operations For j = 1 To ops.Count Set op = ops.GetAt(j) Set params = op.Parameters For k = 1 To params.Count Set param = params.GetAt(k) MyDialog.OpName = op.Name MyDialog.ParamName = param.Name MyDialog.ParamType = param.Type result = Dialog(MyDialog) ctrl = MyDialog.OptionGroup1 DescStr1 = Left$(param.Type, 3) If DescStr1 = "in " Then PostType = Right$(param.Type, Len(param.Type) - 3) Else If DescStr1 = "out" Then PostType = Right$(param.Type, Len(param.Type) - 4) Else If DescStr1 = "ino" Then PostType = Right$(param.Type, Len(param.Type) - 6) Else PostType = param.Type End If End If End If If ctrl = 0 Then param.Type = "in " & PostType End If If ctrl = 1 Then param.Type = "out " & PostType End If If ctrl = 2 Then param.Type = "inout " & PostType End If Next k Next j Next i MsgBox "Done" End Sub '<> '--------------------