Jump to content

Recommended Posts

Posted

Hello everyone
I am looking for a Lisp that when selecting a line, polyline or circle can give me the name of its layer. and changing the name of the layer updates the text. it's possible?
I use the LAYTEXT lisp but I would like to change the name of the layer automatically update the text

 

Thank

laytext(Texto en capas).LSP example.dwg

Posted

Simply replace 

(vla-get-Layer (vlax-ename->vla-object ent))))

with

(strcat "%<\\AcObjProp Object(%<\\_ObjId " (itoa (vla-get-ObjectID (vlax-ename->vla-object ent))) ">%).Layer>%")))

in Lee Mac's code to label it with a field instead of text.

It will update according to settings of FIELDEVAL (System Variable).

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