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

Glossary Item Box

Description

Each command in PC-DMIS has a unique idenification. This is the GUID (Globally Unique Identifier). This returns the identification as a string value.

Property type

Read-only property

Syntax

Visual Basic
Public Property CommandGUIDString As String

Return Type

String value of the unique ID.  The ID is in a format similar to this: "B616879E-4100-43E8-A865-185FF7DE0278".

Example

This example cycles through all the commands and displays the GUID for each in a message box.
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
      MsgBox "Unique GUID for command " & i  & " is " & Cmds(i).CommandGUIDString
  Next Cmd
End Sub

See Also

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