Hello everybody,
I'm using a LeeMac AutoLisp, "Copy2Drawing", to copy some objects into a list of drawings in a directory.
I want to extend the code by adding some more functions. But these new functions only work on the current document, and not on the entire collection of drawings .
The new functions would be:
- set layer "0" as the current layer,
- freeze two layers (if they exist) according to some indicated names.
The code I used as follow (unsuccessfully), between highlighted lines (included in an extract from the original AutoLisp file):
)
)
)
)
)
;; New code start
layer2
(vla-item LayerTable
"LayerName2") )
;; New code finish
)
)
)
Note: "layer1" and "layer2" will not always exist. It may be that both exist, only one of them, or that neither exist.
Could you help me about this?