core

#### Pointer Functions

DIST2D

2d Distance: DIST2D(<FEAT1>, <FEAT2>, <FEAT3>)

The features must be inside curly braces.

This calculates the distance between the first two arguments in the command (Feat1 and Feat2), perpendicular to the third argument (Feat3).

- If the third argument is a plane, the distance between the first two arguments is calculated perpendicular to the plane.

- If the third argument is a line or cylinder, the distance between the first two arguments is calculated perpendicular to the third argument in the active workplane.

For example, if you have the XY plane as your third argument, it will have a Z+ vector (0,0,1) and the distance reported will only be in the Z axis.

Example

ASSIGN/V3=DIST2D({CIR1},{CIR2},{PLN1})

COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,

V3

DIST3D

3D Distance: DIST3D(<FEAT1>, <FEAT2>)

Calculates the 3D distance between Feat1 and Feat2.

The features must be inside curly braces.

Example

ASSIGN/V3=DIST3D({CIR1},{CIR2})

COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,

V3

GETCOMMAND

Obtains a pointer to the command specified by the parameters: GETCOMMAND(<Integer or String>, <String>,<Integer>

First Parameter-Command Info Field

The first parameter is the command info field. It specifies the command type for which to search. The following can be passed in:

1. - A command description string. See (A) in the graphic below.

   - A command type number. See (B) in the graphic below.

   - The unique number identifier. See (C) in the graphic below.

If the unique id of the command is passed in, no other arguments are necessary.

To obtain the command description string, the command type number, and the command’s unique number identifier:

1. 1. Right-click in the Edit window

   2. Choose Change Pop-up Display | Command Information (PC-DMIS must be in Command Mode).

   3. Position the mouse over the desired command. The command description, type number, and unique number identifier for that command will be displayed in the pop-up.

Sample Command Information Showing (A) Command Description String, (B) Command Type Number, and (C) Unique Number Identifier (UID).

Second Parameter - Search Direction

The second parameter is the search direction. Legal values include:

Value | Description
UP | This value signifies the search should start at the current command and proceed upwards
DOWN | This value signifies the search should start at the current command and proceed downwards.
TOP | This value signifies that the search should begin at the beginning of the measurement routine in a downwards direction
BOTTOM | This value signifies that the search should begin with the last object in the measurement routine in an upwards direction

Third Parameter - Which Instance to Find

The third parameter indicates which instance of the command should be found if multiple instances of the same command are in the measurement routine.

If the measurement routine has two instances of a STATS/ON command and you would like to obtain a pointer to the second instance from the top, "2" would be passed in as the third parameter and "TOP" would be passed in as the second parameter as shown here.
ASSIGN/V1=GETCOMMAND("Statistics","TOP",2)

The GETCOMMAND function can be used to supply the third parameter to the GETTEXT string function. See "String Functions" for information on GETTEXT.

LEN

Pointer loop count: LEN(<POINTER>)

Returns the number of times a pointer has been in a loop. For example, if feature CIR1 is in a loop that iterates 10 times, you can store how many times CIR1 has been measured in a variable, by using an ASSIGN statement like this: ASSIGN/V1=LEN({CIR1})