How to make Layer Control change color to ByLayer

How to make Layer Control change color to ByLayer

Anonymous
Not applicable
2,058 Views
3 Replies
Message 1 of 4

How to make Layer Control change color to ByLayer

Anonymous
Not applicable

With entities gripped in the drawing editor, how do I then select a layer from the Layer Control pulldown and change the entities to not only the Layer picked but the colour to ByLayer?

Will this require adding some lisp or reactor of some type?

It would have been great if the Layer Control changed to not only the Layer, but to the color and linetype of that layer.

Any help or suggestions are appreciated.

 

0 Likes
Accepted solutions (1)
2,059 Views
3 Replies
Replies (3)
Message 2 of 4

Kent1Cooper
Consultant
Consultant

Nothing built in will change all of those things at once.  In the Properties palette, you'll see they're all separate "slots" that you would need to pick in to set them to ByLayer or other defaults.

 

What I use to set all properties to defaults  is ByLayer.lsp, available >here<, which sets all properties to ByLayer for which that is the default [color, linetype, lineweight], but also sets Thickness to 0 and Linetype Scale to 1.  [I should probably add Transparency to ByLayer -- that didn't exist when I wrote it.]  You can do it to only selected objects with the BYs command [which works in either verb-noun or noun-verb sequence], or to all objects in the current space with the BYall command, or to everything in all spaces in the entire drawing with the BYevery command.  And with no object selection involved, the BYce command sets all the current-entity Properties to the same defaults.

 

But since there is no "default" Layer, that is not set with those commands -- you would have to change the Layer of something(s) by any of the other means available, but at least if you follow that with BYs, it would be only two steps to change the Layer and default-ify all those Properties, rather than up to seven steps.

 

I don't think what you want could be incorporated into the Layer pull-down [and if it could, what if you sometimes wanted to change something's Layer but leave other Properties, such as a color or linetype override?].  But something could probably be built with its own separate dialog box for selecting the Layer name.  I haven't delved into DCL and dialog-box commands, but others may be capable of making something like that.

Kent Cooper, AIA
0 Likes
Message 3 of 4

Anonymous
Not applicable
Accepted solution

I suspected as much... as someone mentioned, it is just a "Layer" Control and not a color or linetype control. It would have been nice if another system variable was available to switch the use to multiple functions since it's a major part of any layering system.

Thanks for your lisp code, I shall investigate.


@Kent1Cooper wrote:

Nothing built in will change all of those things at once.  In the Properties palette, you'll see they're all separate "slots" that you would need to pick in to set them to ByLayer or other defaults.

 

What I use to set all properties to defaults  is ByLayer.lsp, available >here<, which sets all properties to ByLayer for which that is the default [color, linetype, lineweight], but also sets Thickness to 0 and Linetype Scale to 1.  [I should probably add Transparency to ByLayer -- that didn't exist when I wrote it.]  You can do it to only selected objects with the BYs command [which works in either verb-noun or noun-verb sequence], or to all objects in the current space with the BYall command, or to everything in all spaces in the entire drawing with the BYevery command.  And with no object selection involved, the BYce command sets all the current-entity Properties to the same defaults.

 

But since there is no "default" Layer, that is not set with those commands -- you would have to change the Layer of something(s) by any of the other means available, but at least if you follow that with BYs, it would be only two steps to change the Layer and default-ify all those Properties, rather than up to seven steps.

 

I don't think what you want could be incorporated into the Layer pull-down [and if it could, what if you sometimes wanted to change something's Layer but leave other Properties, such as a color or linetype override?].  But something could probably be built with its own separate dialog box for selecting the Layer name.  I haven't delved into DCL and dialog-box commands, but others may be capable of making something like that.


 

0 Likes
Message 4 of 4

ronjonp
Advisor
Advisor

More solutions HERE too.

0 Likes