Layer creation while on the change properties command.

Mayra.Moyles
Participant
Participant

Layer creation while on the change properties command.

Mayra.Moyles
Participant
Participant

Why can't I create a layer in the middle of a command that requires a particular layer to exist?

Why do I need to exit the command and go to the "create layer" mode, why can't I just create the layer on the fly inside of any other command?  For example, inside of the following commands, "move to layer", " make current", "change properties", "annotate", etc.  Or have I been hibernating, and we can do this already? I am running vanilla AutoCAD 2023.

0 Likes
Reply
Accepted solutions (1)
877 Views
14 Replies
Replies (14)

pendean
Community Legend
Community Legend
is this by chance your exact problem https://www.autodesk.com/support/technical/article/caas/sfdcarticles/sfdcarticles/Error-Unable-to-mo...

Otherwise... the LAYER palette works just fine here in 2023 while in a command (MOVE for example) to do what you are asking for if I understand it correctly.
or if you prefer to type, use an apostrophe with a hyphen then activate the MAKE sub-option, like this
'_LAYER
MAKE
MyFunkyLayerNamHere
and so on... .

Make sure ABOUT command shows you having 2023.1.3 installed.
0 Likes

Mayra.Moyles
Participant
Participant

Not really. what I want to be able to do is create the missing layer inside of the command that requires the layer to existing. As picking an object and wanting to place it in a particular layer but that layer does not exist. customarily I exit the command currently running (properties, move to layer, etc) and have to call out the "create layer" in the layer command.

same as we could zoom-pan inside a command by using the apostrophe. Old school here. 

0 Likes

pendean
Community Legend
Community Legend
Got it: automation like that does require pre-planning on the part of the user in AutoCAD at this stage of the game. LISP or macro is the way we old timers like to do it, if starting in a template that has all things 'standards' is never an option.

The Customization forums here have many suck requests you can find and reuse for your setup right now https://forums.autodesk.com/t5/autocad-customization/ct-p/AutoCADTopic1

If you'd only like to see it as a built-in button clicking option, the place to ask Autodesk for that feature in the future would be over here https://www.autodesk.com/company/contact-us/product-feedback

HTH
0 Likes

Kent1Cooper
Consultant
Consultant
Accepted solution

@Mayra.Moyles wrote:

Why can't I create a layer in the middle of a command that requires a particular layer to exist?

....


You can.  Type in 'LAYER [or just 'LA if you haven't changed the default alias] with the apostrophe prefix.  That brings up the Layer Manager, where you can do what you need, and when done, returns you to the command in progress.  Or if you want to do it at the command line instead of the Layer Manager, use '-LAYER [or '-LA], with the apostrophe and hyphen prefixes.

 

That's called "transparent" use of the command, and a variety of commands can be used that way.  See "Interrupt a Command with Another Command or System Variable," >here<.

Kent Cooper, AIA
0 Likes

Mayra.Moyles
Participant
Participant

just tried while in the change properties command and 'layer did not bring up the layer command.

is there something I am doing wrong?

0 Likes

Mayra.Moyles
Participant
Participant

 

this is what I saw when I tried the apostrophe use.

 

Enter new layer name <A-Rack>: pequip
Cannot find layer "pequip".
Enter new layer name <A-Rack>: 'layer
Cannot find layer "'layer".

Mayra.Moyles
Participant
Participant

Maybe I am just too old school.

I do have a layer template with the common layers we use.

But we receive so many vendor drawings with hundreds of layers just want to be able to create the one of two layers when necessary, without stopping. Maybe I am moving too fast for my own good.

Kent1Cooper
Consultant
Consultant

@Mayra.Moyles wrote:

this is what I saw when I tried the apostrophe use.

 

Enter new layer name <A-Rack>: pequip
Cannot find layer "pequip".
Enter new layer name <A-Rack>: 'layer
Cannot find layer "'layer".


Which Layer option are you in at that point?  If it's Set, it will give you that message if the Layer doesn't exist, but I doubt it -- the prompt would be different.  I'm not getting exactly that prompt in either the Make or New options, either [maybe version differences?  Acad2020 where I am now].  Show us the broader context of prompts for the "outer" command you're in, where you are in its sequence, and exactly how you get into 'LAYER from there.  In case you might have an override-defined Layer command, try .-'LA with the period prefix, to force use of the native command.

Kent Cooper, AIA
0 Likes

pendean
Community Legend
Community Legend
Perhaps you are unaware that the MAKE sub-option in '-LAYER command can (an old-timer tip)
1) Create a layer if it odes not exist and makes it current.
2) If the layer is there, it just makes it current.

https://help.autodesk.com/view/ACD/2023/ENU/?guid=GUID-2C75A883-10CA-4B6C-96AC-BCD7A7794614#:~:text=....

How to use -LAYER command https://help.autodesk.com/view/ACD/2023/ENU/?guid=GUID-2C75A883-10CA-4B6C-96AC-BCD7A7794614#:~:text=...
inside another command https://help.autodesk.com/view/ACD/2023/ENU/?guid=GUID-BB0C3E79-66AF-4557-9140-D31B4CF3C9CF#:~:text=....

Kent1Cooper
Consultant
Consultant

@Kent1Cooper wrote:
....  I'm not getting exactly that prompt in either the Make or New options, either ....

That must be because I think you are in the LAyer option in the CHPROP command [or under the Properties option in the CHANGE command], not in the 'LAYER command yet.  It seems since the prefix characters are all acceptable as parts of Layer names, this can't be done at that point in the process.  It works earlier in the command, such as at the which-Property-do-you-want-to-set prompt.  I even tried setting TEXTEVAL so that AutoLisp expressions should be evaluated rather than taken literally, and put in (command "_.'layer") there, but since parentheses are also acceptable as parts of Layer names, that didn't work either.  I'm not sure whether there's a way around that, but if you can do the 'Layer part before getting as far as into the LAyer option in CHRPOP, you can still do it.

Kent Cooper, AIA
0 Likes

Mayra.Moyles
Participant
Participant

I will try that..it would be very helpfull if Autocad instead of telling me "cannot find layer.." it would say, "cannot find layer, would you like to make new layer (y/n)? "

Am I asking for a bit too much?

Usually, I do not know if a layer exists in the file till, I try finding it..lol

I will continue to do as I currently do.

Thanks for trying to help.

 

 

pendean
Community Legend
Community Legend

@Mayra.Moyles wrote:

I will try that..it would be very helpfull if Autocad instead of telling me "cannot find layer.." it would say, "cannot find layer, would you like to make new layer (y/n)? "


You can make that wishlist to Autodesk for future versions where they look for such feedback from us users, right here https://www.autodesk.com/company/contact-us/product-feedback 

Mayra.Moyles
Participant
Participant

I already submitted to AutoCAD.

thanks!

Kent1Cooper
Consultant
Consultant

@Mayra.Moyles wrote:

....it would be very helpfull if Autocad instead of telling me "cannot find layer.." it would say, "cannot find layer, would you like to make new layer (y/n)? " ....


There is one circumstance that kinda-sorta works in a similar way, in the sense of just creating the Layer if it doesn't already exist, without the use of a Layer command or (vla-add...) methods or anything, though it won't help you with the current topic unless you want to do your Layer changing through AutoLisp rather than CHANGE/CHPROP.

 

If you pull the entity data list for an object in AutoLisp, and you go to change its Layer by (subst)ituting or (append)ing an entry for the Layer [the DXF code 8 entry], the Layer name you include there will be used, whether or not the Layer exists.  If it doesn't exist, it will be created in the process, using default continuous linetype and color 7 used for new Layers.

Kent Cooper, AIA
0 Likes