IDs for Features Within Subroutines, Basic Scripts, or External Routines

Subroutines can be located within the current measurement routine or in an external measurement routine. When the subroutine is located in the same routine as the call to the subroutine, you can use the feature array ID syntax explained under "Feature Arrays:" to refer to individual instances of a feature created in the subroutine. However, when the subroutine is located in an external measurement routine, you can use the following syntax to refer to any features created in the subroutine: "<Call Sub ID>:<FeatID>".

For example, if a feature named "F1" were located in an external subroutine that was called from a Call Sub command with the id "CS1", then the ID expression "CS1:F1" could be used to refer to that feature.

This example merely illustrates the use of the syntax CS1.F1 and is not intended to use.

Routine 1: PLUS1.PRG

SUBROUTINE/PLUS1, A1 = 0, A2 = 0, A3 = 0
F1 =FEAT/POINT,RECT
THEO /A1+1,A2+1,A3+1,0,0,1
ACTL/3,1,1,0,0,1
MEAS/POINT,1
HIT /BASIC,A1+1,A2+1,A3+1,0,0,1,0,0,0
ENDMEAS/
ENDSUB/

Routine 2: TEST.PRG

CS1 =CALLSUB/PLUS1,D:\V30\WINDEBUG\PLUS1.PRG: 3,3,3,,
DIM D1= LOCATION OF POINT CS1:F1 UNITS=IN,$
GRAPH=OFF TEXT=OFF MULT=10.00 OUTPUT=BOTH
AX NOMINAL +TOL -TOL MEAS MAX MIN DEV OUTTOL
X 3.0000 0.0000 0.0000 3.0000 3.0000 3.0000 0.0000 0.0000
----#----
END OF DIMENSION D1

Basic scripts create and delete objects dynamically. Use the syntax "<Basic Script ID>:<Feat ID>" to refer to a feature created by a basic script. For example, if a basic script with ID "BS1" creates a feature with ID "F2", use the ID expression "BS1:F2" to refer to that feature.

You can use the attach command to attach external routines to PC-DMIS. To refer to features in the attached routine, use the following syntax: "<Attach Routine ID>:<Feat ID>". To refer to feature "F3" in the attached measurement routine with ID "GEAR1", use the expression, "GEAR1:F3". (For more information, see "Attaching an External Measurement Routine" in the "Adding External Elements" chapter.)