Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Command line Space Holder Character

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
Daubon
663 Views, 2 Replies

Command line Space Holder Character

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...:

  • "Command: -LA
    -LAYER
    Current layer: "0"
    Enter an option [?/Make/Set/New/Rename/ON/OFF/Color/Ltype/LWeight/TRansparency/MATerial/Plot/Freeze/Thaw/LOck/Unlock/stAte/Description/rEconcile/Xref]: off
    Enter name list of layer(s) to turn off or <select objects>: EDGES [5]
    No matching layer names found."

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

Labels (1)
2 REPLIES 2
Message 2 of 3
Kent1Cooper
in reply to: Daubon

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].

Kent Cooper, AIA
Message 3 of 3
Daubon
in reply to: Daubon

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.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report