PC-DMIS 2022.1 Object Library
ID Property
See Also  Example  Send Topic Feedback | See Object Hierarchy Chart
PCDLRN ActiveX DLL > Command Object : ID Property

Glossary Item Box

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

See Also

Copyright © 2022. Hexagon Manufacturing Intelligence – Metrology Software, Inc. All Rights Reserved.