Jump to content

Select a object and open Layer Properties Manager


Recommended Posts

Posted

Hi, I can't do it with normal use so I ask if it is possible to select an object and through lisp open the Layer Properties Manager directly to the layer row of the selected object.

Thank you in advance

Posted (edited)

I don't know about directly to it but the layer will be highlighted since this lisp sets is as the current layer.

 

(defun C:foo (/ lay)
  (setq e (car (entsel "\nSelect Entity for Layer: ")))
  (setq lay (cdr (assoc 8 (entget e))))
  (setvar 'clayer lay)
  (prompt (strcat "\nEntity is on \"" lay "\" Layer"))
  (command "_layer")
  (princ)
)

 

Entity is on "Test-Layer-123" Layer

 

Edited by mhupp
always forgetting the princ
Posted

With the Layer List Combo Box added to the Quick Access Toolbar it automatically displays the layer of a selected object allowing you to modify the layer's color, toggle it on/off, frozen/thawed, locked/unlocked or change selected objects to whatever layer you want.

 

If you have so many layers showing in Layer Manager that what you want is hard to find try using Layer Filters.

Posted

You could do a custom dcl that opens just that layer display color, linetype, on off etc the color would open a sub dialog (acad_colordlg), linetype a list box etc.

  • 2 weeks later...
Posted

Sorry for the delay with which I thank for your help

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...