Apply Layer to object directly via Layer Properties Manager?

Apply Layer to object directly via Layer Properties Manager?

Stefan.Wieser.ecoMAP
Enthusiast Enthusiast
1,347 Views
7 Replies
Message 1 of 8

Apply Layer to object directly via Layer Properties Manager?

Stefan.Wieser.ecoMAP
Enthusiast
Enthusiast

Hi there. I have kind of a small problem but didnt find any solution anywhere.

 

I simple want to change the layer of a object. The problem is: The template Im using provide 350 layers and even they are sorted well it always takes time to find the right one when i go to the dropdown list.

 

As Im just using about 10 Layers out of this i created a group in the layer Properties Manager but Im not able to apply one of this to my objects. The dropdown list in the Properties still shows all layers.

 

There is the command laymcur (Make Current) where you can set the current layer to the selected object but i would need exactly the opposite. So make the object the current layer.

 

Or is there a commant so the dropdown list shows only the layer of my selected layer group?

 

Thanks for help. This would me save a lot of time...

0 Likes
1,348 Views
7 Replies
Replies (7)
Message 2 of 8

WeTanks
Mentor
Mentor
Accepted solution

请看一下这段录音。

We.Tanks

EESignature

A couple of Fusion improvement ideas that could your vote/support:
図面一括印刷

0 Likes
Message 3 of 8

Kent1Cooper
Consultant
Consultant
Accepted solution

In short, as demonstrated in @WeTanks's video, use the pull-down in the ribbon [which shows those Layers that currently show in the Layer Manager, where you can have a filter applied] rather than the one in the Properties palette [which shows all Layers].

Kent Cooper, AIA
Message 4 of 8

paullimapa
Mentor
Mentor
Accepted solution

Once you learned how to quickly select the layer you want current here’s the code to run to let you select objects that you want to change to the current layer:

(defun c:ch2clay ( / ss i ent )
(princ"\nSelect Objects to change to current Layer")
(setq ss (ssget) i 0)
(while (< i (sslength ss))
(setq ent (entget (ssname ss i)))
(setq ent (subst (cons 8 (getvar "clayer")) (assoc 8 ent) ent))
(entmod ent)
(setq i (+ i 1))
)
(princ (strcat "\n" (itoa i) " Objects changed to current Layer [" (getvar "clayer") "]"))
(princ)
) ; defun

 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 5 of 8

Kent1Cooper
Consultant
Consultant

@paullimapa wrote:

.... select objects that you want to change to the current layer:

....
(setq ss (ssget) i 0)
(while (< i (sslength ss))
(setq ent (entget (ssname ss i)))
(setq ent (subst (cons 8 (getvar "clayer")) (assoc 8 ent) ent))
(entmod ent)
(setq i (+ i 1))
)
....

You [can if you want, but] don't need to change them all individually, but can do them all together:

(defun c:ch2clay ( / ss i ent )
  (prompt "\nSelect Objects to change to current Layer")
  (setq ss (ssget "_:L"))
  (command "_.chprop" ss "" "_layer" (getvar 'clayer) "")
  (prompt (strcat "\n" (itoa (sslength ss)) " Objects changed to current Layer [" (getvar "clayer") "]"))
  (princ)
) ; defun​

[I also limited it to things not on locked Layers.  I could also be made to check whether there's a selection before proceeding, etc.]

Kent Cooper, AIA
0 Likes
Message 6 of 8

WeTanks
Mentor
Mentor
Accepted solution

ch2clay = LAYCUR ?

 

WeTanks_0-1682890409501.png

 

We.Tanks

EESignature

A couple of Fusion improvement ideas that could your vote/support:
図面一括印刷

0 Likes
Message 7 of 8

paullimapa
Mentor
Mentor

thanks for pointing that out..I knew there was a command that did it but I just couldn't remember.


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 8 of 8

payingtoomuch
Collaborator
Collaborator
Accepted solution

There is also a way to apply the same filter to the properties pallete as well.... but can't remember the setting.... sorry.

That being said my preference is to leave the properties pallette to where it shows ALL the layers and have the drop down in the  ribbon coordinated with the layer filters. That way you always have a place to grab a layer from that is not in the filter but also have the convenience of using the filter.

0 Likes