Represents the ID of the command.
Read-write property
Visual Basic |
---|
Public Property ID As String |
Read/write String.
Only objects that have ID strings can be set. If a object does not have a string, this property is the zero-length string "".
This example cycles through each command and displays the ID in a message box if its length is greater than zero characters.
Example (Visual Basic) | Copy Code |
---|---|
Sub Main Dim App As Object Set App = CreateObject ("PCDLRN.Application") Dim Part As Object Set Part = App.ActivePartProgram Dim Cmds As Object Set Cmds = Part.Commands Dim Cmd As Object Dim i As Integer i = Cmds.Count i = 0 For Each Cmd In Cmds i = i + 1 If len(Cmds(i).ID)>0 Then MsgBox "The ID for command " & i & " is " & Cmds(i).ID End If Next Cmd End Sub |