Visual Basic |
---|
Public Function GetMarkedSetName( _ ByVal index As Long, _ ByRef markedSetName As String _ ) As Long |
- index
This determines the index value to use.
For example, if your routine has three marked sets, 0 indentifies the first set, 1 identifies the second set, and 2 identifies the third set.
- markedSetName
- This is a string variable that you can use to store the returned marked set name.
This returns a long value that signifies True (-1) or False. (0).
Be aware that in this case, when a Boolean value is converted to a numeric type, True is -1 and False is 0.
Suppose your routine has three marked sets named "test1", "test2", and "test3". The example below passes 1 as the index. This returns a -1 value (True) and then stores the name of the second marked set in markedSetNameOut. The message box says, "True - test2".
If you pass an index value for a set that doesn't exist, this returns 0 (False).
Example (Visual Basic) | Copy Code |
---|---|
Sub Main Dim PP As Object Dim markedSetNameOut As String Dim markedSetIndexCounter As Long Set Pcdmis = Nothing Set Pcdmis = GetObject("", "PCDLRN.Application") Set PP = Pcdmis.ActivePartProgram markedSetIndexCounter = 1 If (PP.GetMarkedSetName(markedSetIndexCounter, markedSetNameOut) = -1) Then MsgBox "True - " & markedSetNameOut Else MsgBox "False - There is no marked Set For the passed index" End If End Sub |