GRIP Introduction | Global Parameter Access Symbols Statement List


Global Parameter Overview

This topic covers all Global Parameter Access Symbols (GPAs). GPAs provide a means of accessing functional data which is used by NX to control how objects are created, displayed, filed, etc.

Global Parameter Access Symbols fall into the following categories:

All GPA symbols begin with the ampersand character (&) which is known as the prefix character.

Each GPA symbol is associated with either a unique global parameter or a constant, and has an ACCESS TYPE, DATA TYPE, and RANGE.

ACCESS TYPE defines the READ/WRITE status of the GPA. GPAs contain data which can be extracted (READ) for use in your program. Some symbols allow you to alter the data directly (WRITE) by assigning the properly valued data to the GPA.

DATA TYPE defines whether a particular GPA is object, number, or string valued. The data associated with a GPA, if object valued, must be treated like an object as it is assigned or extracted. If you READ an object valued GPA and assign the data to a variable, the variable must be declared as an ENTITY.

ENTITY/PART
PART=&PARATT

Number valued GPAs, when assigned to a variable, do not need to be declared. In the following program, the system assumes that NUM is a numerical variable without it being declared as such.

NUM=&ATTDIS
JUMP/L10:,,NUM
&ATTDIS=&YES
L10:
.
.
.

String valued GPAs, when assigned to a variable, must be declared as a STRING.

STRING/STR(8)
STR=&CRDATE
.
.
.

RANGE defines the value which can be assigned to a GPA. Some GPAs have multiple parameters (e.g., &ON or &OFF) which have numerical values that lie within their RANGE. These parameter options have a constant, single numerical value which cannot be changed (e.g., the value of &ON is always 1). The RANGE of string valued GPAs is defined in the number of characters allowed in the string (e.g., &CRDATE has a range of 8 characters).

There are several GPAs which deal with system constants. These GPAs are not associated with any other GPAs and have no DATA TYPE, ACCESS TYPE, or RANGE. The way they are used is dependent on each GPA. The GPAs are as follows:

&NULENT determines if an object identifier exists in the data base. You can see if an object exists in the data base by extracting its status. For example, you could test to see if LN1 was an object as follows:

IF/LN1<>&NULENT,DELETE/LN1

If LN1 is not equal to a null object, it will be deleted.

&NULSTR works like &NULENT except that it tests to see if a string has any characters. For example, you could test to see if STR contained any characters as follows:

IF/STR==&NULSTR,JUMP/L10:
.
.
.
L10:TEXT/'NO CURRENT TXT-ENT TEXT',STR,RESP
JUMP/L10:,TERM:,,,,RESP

If STR is a null string, you will be prompted to enter the text.

&PI contains the constant value for PI. It can be used anywhere a numerical value is valid. For example:

ENTITY/PT1,PT2,CR1
PT1=POINT/0,0
PT2=POINT/1,1.5
CR1=CIRCLE/CENTER,PT1,PT2
R=&RADIUS(CR1)
ANS=&PI*(R**2)

ANS would equal the area of CR1.