Automating Layers

Automating Layers

Anonymous
Not applicable
249 Views
1 Reply
Message 1 of 2

Automating Layers

Anonymous
Not applicable
Is it possible to use VBA to Automate what layers certain elements are drawn on? For example: Every time I draft a dimension, it would be automatically put on the "Dimension" layer.
0 Likes
250 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
Yes! Use the AcadDocument's BeginCommand event to look for the command in
question. I use a class I set up to store the current layer and other
settings, then a Select Case structure to look at CommandName (the name of
the command) to set layers based on the command. Then, when the EndCommand
event fires, I use the previously mentioned class to restore layer settings.

Ben Rand
CAD Manager
CEntry Constructors & Engineers
brand@centry.net


wrote in message news:5051747@discussion.autodesk.com...
Is it possible to use VBA to Automate what layers certain elements are drawn
on? For example: Every time I draft a dimension, it would be automatically
put on the "Dimension" layer.
0 Likes