*^c^c$M=$(if,$(eq,$(getvar,modemacro),""),_id;\setvar;modemacro;Fancy Line Command - reset the sysvars USERI1 and MODEMACRO before next use;)$(if,$(and,$(<,$(getvar,useri1),255),$(!=,$(getvar,useri1),0)),setvar;useri1;$(+,$(getvar,useri1),1);_-color;$(getvar,useri1);_Line;$(getvar,lastpoint);\,setvar;useri1;1)
The program flow is as described below.
- First check whether the modemacro system variable is empty - $(eq,$(getvar,modemacro),"").
- If it's empty then prompt for a starting point for the line and set the mode macro system variable - _id;\setvar;modemacro;Fancy Line Command - reset the sysvars USERI1 and MODEMACRO before next use;
- If it is not empty, then the first point has already been selected, now we have to check for the ACI color index limits stored inside the useri1 system variable - $(and,$(<,$(getvar,useri1),255),$(!=,$(getvar,useri1),0))
- If everything is ok, then increment the color index value by 1, set the color value and draw a line with that color - setvar;useri1;$(+,$(getvar,useri1),1);_-color;$(getvar,useri1);_Line;$(getvar,lastpoint);\
- If the color index is not within the ACI limits, then skip the previous step and set the color index value inside useri1 to 1 (Red color) - setvar;useri1;1
- Continue the above steps until the user press escape button - *^c^c
^c^c_setvar;modemacro;.;;useri1;0
Shown below is an output image of the command.
No comments:
Post a Comment