This example demonstrates the use of the &DMTEXT EDA to write a note using text from a dimension.
$$
$$ Declarations
$$
ENTITY/L(4),DIM1
STRING/STR(30)
L10:PARAM/'ENTER STK DIMS',$
'LENGTH',LNG,$
'DIAMETER',DIA,RESP
JUMP/L10:,TERM:,,RESP
L(1)=LINE/0,0,LNG,0
L(2)=LINE/LNG,0,LNG,DIA
L(3)=LINE/LNG,DIA,0,LNG
L(4)=LINE/0,LNG,0,0
DIM1=LDIM/HORIZ,LNG/2,3,XSMALL,L(3),XLARGE,L(3)
CYLDIM/LNG+1,ANG/2,YLARGE,L(2),YSMALL,L(2)
STR=&DMTEXT(DIM1)
NOTE/LNG/2,-.5,'REQUIRED MATERIAL STOCK = '+STR
TERM:HALT
The note will be written with the same text as DIM1. There are other ways to create this note; however, this method assures that the decimal places in the note match the dimension.