I use LT 2002. I am trying to set some variables using diesel. I am using setenv to establish two values (p1 and p2) which will be used by the variables. In theory I can set p1 and p2 which will then be used by the macro to give the two points the system variables need during the macro. I wan to set the "dist" and "snapang" sysvars. Here is the problem: The macro effectively sets the p1 and p2 variables to new values every time, but whe the setvar sequence is issued, the macro inserts the values that p1 and p2 had BEFORE the macro set them. In other words, the values issued for to set the variables are two itterations old. I have found example for setting and using the setenv/getenv routines, but when I use them I don't get the desired results. So, my question is: How do I make the macro return the correct values. Here is a sample of the macro. I have modified it in various ways but none work. ^C^C_id;endp;\_setenv;P1;$m=$(getvar,lastpoint);_id;endp;\_setenv; P2;"$m=$(getvar,lastpoint)";snapang;$m=$(getenv,p1);$M=$(getenv,p2);dist;$M=$(ge tenv,p1);$M=$(getenv,p2); Thanks, Jeff <><