@Anonymous wrote:
....
Is it possible to write a macro that goes as this:
- go to a certain layer;
- draw polyline;
- set linetype;
- set color;
- set global width;
Thus, i would like to have just ONE button, where i have these commands going in a row.
....
Since that request includes so much more than the macro line in the accepted Solution, I have some questions: Do the last three items in your list apply to the Polyline to be drawn as the second item? If so, shouldn't those last three items be set before drawing the Polyline? Or is the idea to apply those Properties to the Polyline after it's drawn? Or do the last three apply to the overall drawing settings, independent of the Polyline just drawn?
If they are Properties to apply to the Polyline, with the linetype & color as overrides rather than coming from the characteristics of the Layer, then in simplest terms:
^C^C-LAYER S 0 ;CELTYPE HIDDEN CECOLOR 1 PLINEWID 0.5 PLINE
Edit all these parts for your particular needs. The Linetype would need to be already loaded into the drawing, but that limitation can be overcome if necessary.
If the idea is to apply those Properties to the Polyline after it's drawn, perhaps so that you don't have to reset any System Variables, then a macro isn't the way to do it, because it can't wait for an unspecified number of User inputs in drawing the Polyline until that is finished, and then go on to change Properties, the way an AutoLisp routine can. The same problem applies to my suggested macro if you want it to reset the System Variables after you draw the Polyline. A Lisp routine could be defined that would handle those complications, and a macro could just call that routine, if that will work for you.
Kent Cooper, AIA