### Accessing Methods and Properties

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

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 part program, 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)