PC-DMIS 2019 R1 Object Library
Accessing Methods and Properties
Send Topic Feedback | See Object Hierarchy Chart
Getting Started > Accessing Methods and Properties

Glossary Item Box

There are two ways to get to an object's methods and properties.

  1. Create objects by their ID
  2. Call the object from an existing object

Whether you're creating an object or calling an object from an existing object, you'll need to first create and then set a pointer to the appropriate object.

Step 1: Declare the pointer variable name for the application by using the "DIM" statement. For example:

Dim App As Object

Step 2: Set the pointer variable to the PCDLRN Application using CreateObject. For example:

Set App = CreateObject("PCDLRN.Application")

Step 3: Declare and set additional pointer variable names for any needed sub objects found within the Application object. For example if you wanted to access commands available for the active measurement routine, you're code would look something like this:

Dim Part As Object
Set Part = App.ActivePartProgram
Dim Cmds As Object
Set Cmds = Part.Commands
Dim Cmd As Object
Set Cmd = Cmds.Add(SET_COMMENT, True)

 To access events, see "Accessing Event Subroutines".

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