I am trying to create a little macro that places some boiler plate text next to a polyline that denotes a sewer (see below); the idea is to use the CAL command to get the length of the polyline and then use that in the text. The problem I am having is that the distance is only returned after the -MTEXT command begins and instead of setting the USERR1 variable sets the start point of the MTEXT.
How can I make this macro execute in the correct sequence?
^C^C_setvar;userr1;'cal;dist(end,end);\\;$M=-mtext;\R;\J;BC;H;0.5;W;0;150%%C PVC PIPE "$M=$(getvar,userr1)"m @ 1:100;;
Many thanks in advance.