Message 1 of 3
Lock all XREF layers, but if on current (unlocked) layer, make new layer?

Not applicable
04-26-2018
05:19 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm fairly new to coding .lsp:s and making scripts, but I would like to make a script (button) that locks all XREF layers, which seems fairly simple:
(COMMAND "_.layer" "_lock" "*|*" "") (COMMAND "_qsave") (COMMAND "_Close")
HOWEVER, if XREF(s) are on the current layer, which happens to be unlocked, I would like to create a new, locked layer to which I sent these XREF:s.
What would be the best way to code this?