### Using a Pointer to Reference Data

Often when you access an attached part program, you will want to use data from that part program. When referencing this data you must reference the pointer (or variable ) that contains the location of your part program.

Consider an example:

Suppose you're attaching TEST_A.prg to your current part program. Your attach command would look something like this:

CS1=ATTACH/C:\PCDMISW\TEST_A.PRG, Machine=

EQUATE/LOCAL ALIGNMENT = A1, ATTACHED ALIGNMENT = A1

Notice the pointer, CS1. You will use this pointer to extract data from the attached part program.

Now, suppose you wanted to display the measured X value for feature F1 from TEST_A.prg inside your current part program. You would use a statement like this.

COMMENT/OPER,"The X value for F1 from the attached part program is:"

,CS1:F1.X

The code, CS1:F1.X, essentially tells PC-DMIS to look at TEST_A.prg, find feature F1, and display the X value. This is the way pointers are referenced inside PC-DMIS.

PC-DMIS also lists features from an attached part program in the Construction or Dimension dialog box. PC-DMIS will display the attached part program’s ID pointer within the Feature List box. A plus sign (+) appears to the left of the pointer. Clicking this plus sign expands or collapses a view of all the features in the attached part program. After you expand the view to show all the features of the attached part program, you can select any of those features to use in the construction or dimension process.

Note: You can not select the attached program’s pointer. Only the expanded IDs associated with that pointer can be selected.