Return to Statement


Number of Object Attributes Example

This example demonstrates the use of the &NATTR EDA to extract the number of attributes assigned to an object.

 
$$
$$ Declarations
$$
NUMBER/STRNUM,INTNUM
ENTITY/CR1
STRING/ATT(6,132)
CR1=CIRCLE/-.5,-.5,.25
ATT(1)='USE'
ATT(2)='MOUNTING HOLE'
ATT(3)='DRILL'
ATT(4)='.5 DIA. .75 DEEP'
ASATT/CR1,ATT(1..4)
ATT(5)='COST'
ATT(6)='135'
ASATT/CR1,ATT(5..6),1
INTNUM/=&NATTR(CR1,1)
STRNUM=&NATTR(CR1)

The variable INTNUM would be assigned a value of 1.
The variable STRNUM would be assigned a value of 2.