Hello all,
I'm trying to change layer properties using the command line. Can anyone tell me what character is used to specify a square bracket in the Layer name on the command line? In the following example "EDGE [5]" is the name of a layer from a DXF I bring in from a 3rd party application. I want to change a series of properties using macros but it doesn't recognize the square bracket. Here is a what I'm typing in...:
I'm sure its the square bracket because if I change the name (remove the brackets) in the Properties Manager and try again, it does recognize the name.
Any help will be greatly appreciated.
Thanks and Happy Holidays!
Pepe Daubon
Solved! Go to Solution.
Solved by Kent1Cooper. Go to Solution.
Type it in as:
EDGES `[5`]
Square brackets are used to enclose multiple characters any of which it will "see". So if you have Layers called "1", "2" and "3", in a command-line Layer command you can assign any property such as color or linetype to all of them at once, or turn them all on or off at once, etc., if when it asks for Layer name(s), you put in "[123]". I suspect "EDGE [5]" would work to assign something to or turn off a Layer called "EDGE 5", but that's not the name of the Layer. "EDGE [567]" would "see" Layers called "EDGE 5", "EDGE 6" and EDGE 7".
The reverse apostrophe ` is the "escape" for special characters, meaning the character following it should be taken literally and not used for its wild-card purpose [read about them in Help for the (wcmatch) AutoLisp function].
Hello Kent and thanks for responding. I understand now! I used the reverse apostrophe immediately before the first square bracket and it now recognizes the name. So thanks for the solution to that issue and also, thanks for the tip on using the square bracket to list various names at once!
Can't find what you're looking for? Ask the community or share your knowledge.