TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Rogcad on July 27, 2020, 02:04:13 AM

Title: New attributes for all blocks on a layer
Post by: Rogcad on July 27, 2020, 02:04:13 AM
I am having a lot of problems with this task! (understatement actually)

My drawing has a number of blocks with one single attribute, all on one layer. (not done by me)

I need to
(1) add a lot of identical new attributes to all these blocks. (ie an identical set of attributes to each block)
(2) later allow the user to edit the attributes
 

I have done basic LISP but have virtually no experience with VL. I have had an extensive trawl through this and other sites but cannot quite find (or understand) enough to make a start.

Any help or guidance appreciated.

thanks
Roger
Title: Re: New attributes for all blocks on a layer
Post by: BIGAL on July 27, 2020, 02:44:44 AM
Using Bedit can do what you want.

Google add attribute to block the code exists all ready. Same search here !
Title: Re: New attributes for all blocks on a layer
Post by: Rogcad on July 28, 2020, 01:33:42 AM
Thanks
Title: Re: New attributes for all blocks on a layer
Post by: Rogcad on July 28, 2020, 01:34:51 AM
Thanks BigAL, I'll look at these and see what I can do!
Title: Re: New attributes for all blocks on a layer
Post by: BIGAL on July 28, 2020, 08:52:49 PM
Start here https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-select-blocks-and-add-attributes/td-p/6869077
Title: Re: New attributes for all blocks on a layer
Post by: Rogcad on July 29, 2020, 02:30:18 AM
Thanks again - yes this works well in adding attributes and has got me started
I will now look at a separate routine to edit some of the attributes while looping through objects - will need to look at dialogue entry which is new territory for me although there are some good tuition postings out there.