Each command in PC-DMIS has a unique idenification. This is the GUID (Globally Unique Identifier). This returns the identification as a string value.
Visual Basic |
---|
Public Property CommandGUIDString As String |
String value of the unique ID. The ID is in a format similar to this: "B616879E-4100-43E8-A865-185FF7DE0278".
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 |