Diesel macro in LT

Discussion in 'AutoCAD' started by Jholt, Nov 8, 2004.

  1. Jholt

    Jholt Guest

    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 <><
     
    Jholt, Nov 8, 2004
    #1
  2. Jholt

    Jholt Guest

    Never mind this. Please see my next question which has more detail.

    jeff <><
     
    Jholt, Nov 8, 2004
    #2
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.