OK - so I realize that this is a question regarding an AutoCAD Macro and not a LISP routine, but I couldn't find a better place for this question. Is there a dedicated subforum for macros?
What I'm trying to accomplish is set a keyboard shortcut for a string of commands. In my office we use AECpolygons with a masking style instead of wipeouts because of the weird issue where wipeouts print as black boxes. So what I've done is write a macro that:
1. Converts a closed polygon into an AECpolygon, retaining original geometry
2. Sets the style of the polygon to "mask"
3. Changes the display color to 255 so that it prints invisibly
4. Sends the masking poly behind the source polygon
Here is my code:
Code:
aecpolygonconvert;;n;-aecpolygonmodify;p;
s;mask;;draworder;p;;b;change;p;;properties;c;255;;
This is all fine and dandy, but in an ideal world I want two more features:
1. Both the source polygon and masking polygon come out on the top of the draw order
2. The source polygon and masking polygon are joined together in an unnamed group
I realize that what I'm trying to accomplish here is quite possibly beyond the scope of what macros can accomplish and I would be better off with a LISP routine or something else. Unfortunately, the CAD standards guru of my office is highly suspicious of scripts and has instructed me to limit my tinkering to macros.
What's kinda awkward is that AutoCAD has a hard time independently keeping track of two objects in the command line at the same time. There is some potential by differentiating between the "last" parameter and the "previous" parameter. Unfortunately, I can only keep these two separate for one command, because as soon as I select something with "last" it becomes the last selected object and is both "last" and "previous" in my next step. So I thought maybe I can throw my source polygon into a named group "1", then ungroup it at the end so that I can reuse the macro multiple times on the same drawing. For some reason I can't get this to work, when I try making a macro to do this, it's getting hung up somewhere and I can't figure out why:
Code:
^C^C_group;create;1;
;draworder;group;1;;f;
Am I being insane with my ambition here? Should I give up and accept my beta version macro as the best I can get, or is there another angle I can hit this from? Any help would be awesome.