Jump to content

Multileaders & Block Attribute Definitions


Recommended Posts

I found this simple lisp code related to multileaders that's working for me, but instead of the text reading 'Aluminum', I'd like it to extract the block's attribute definition. For example, I have a piece of equipment that I've given several attribute definitions to represent the equipment's tag identification, manufacturer, model number, price and so on. How can I get the multileader to read the block's tag identification attribute automatically without manually entering the text information? I'd like to be able to quickly call out different pieces of equipment or furniture with a multileader that identifies their unique tags.

new lisp.lsp

Link to post
Share on other sites
pkenewell

When you are in the MLEADER command and are at the part where you are entering text, right-click and select "Insert Field", then Select Field Category "Objects", Then select "Object" in the "Field Names" list below. Then pick the [+] select button next to the "Object Type" edit box. and select the block in the graphics window you wish to pull the attribute from. In the "Property" list box the attributes will now be displayed. Select the attribute tag you want to use the value of in the text. Select "OK" and the field will be referenced in the MLEADER.

 

Of course this can be done via a Visual LISP function with some exceptions, but it doesn't need to be done that way.

Link to post
Share on other sites

Hi pkenewell, 

Thanks for responding. This is working but is still very manual...I have to create a multileader, then add a field to the text box, then select my object to reference, etc...for each object I want to note. Is there a way to automate these steps but still have the leader extract the correct attribute for each block?

Link to post
Share on other sites
pkenewell
3 hours ago, NicoleC said:

Is there a way to automate these steps but still have the leader extract the correct attribute for each block?

 

Yes - with some programming it's possible, but I'm sorry I don't have time to write it for you.

 

For a reference: Look into Lee Mac's Quickfield function. This will reduce the programming effort anyway. You can also search for Creating Fields on this site - lots of examples out there.

Edited by pkenewell
Link to post
Share on other sites

No code but an idea using Nentsel you can pick the attribute and get its value and tagname, you can also get the actual block id required for a field.

 

Two options just put current att value in leader, or it must be a field in case changed, the 1st is simple, 2nd a bit harder. Need some time.

 

 

  • Agree 1
Link to post
Share on other sites

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