Jump to content

Recommended Posts

Posted

Hello,

 

Is there a way to show LayerName and Description by clicking on a line in a drawing?

 

Like:

You pick a line and a popUp comes up which tells you layername and layer Descrition.

layer Desc on one row and layername on the second.

 

Thanx for help

 

Best regards

Posted

Is this what you looking for?

 

(defun C:WD(/ descr ent layer obj)
(while (setq ent (entsel "\nSelect object (Enter to Exit): "))
 (setq obj (vlax-ename->vla-object (car ent))
layer (vla-get-layer obj)
descr (vla-get-description
	(vla-item
	  (vla-get-layers
	    (vla-get-activedocument
	      (vlax-get-acad-object))) layer)))
 (alert (strcat "Description: " "\"" descr "\"" "\nLayer: " "\"" layer "\"" "."))
)  
(princ)
)
(prompt "\n\t***   Type WD to run   ***")
(princ)

Posted

Is a Layer Description only in later versions? - the LISP doesn't seem to work on '04 :huh:

Posted

I think this thing was added starting from A2005

but not sure about

 

~'J'~

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