Send Topic Feedback | See Object Hierarchy Chart
PC-DMIS 2023.2 Object Library
ID Property
Description
Represents the ID of the command.
Property type
Read-write property
Syntax
Visual Basic
Public Property ID As String
Return Type
Read/write String.
Remarks

Only objects that have ID strings can be set. If a object does not have a string, this property is the zero-length string "".

Example
This example cycles through each command and displays the ID in a message box if its length is greater than zero characters.
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
See Also