Mechanical design engineer Chris Edwards shares a modification to the original AutoCAD LISP routine AttOut that will allow you to access data in attributed blocks across multiple file tabs, rather than just one.

“If you ever have needed to edit multiple block attributes across multiple layout tabs, you know this is where the AttOut command really falls short because it can handle only one tab at a time. To overcome this I have devised the following routine. Start with the original ATTOUT.LSP file and make a copy to, say, ATTOUTMULTI.LSP. Change the command call on the first line from c:attout to something sensible; again, c:attoutmulti works for me. The next bit is the magic.

"Scroll down to line 27 (this may vary according to your version), which should read:

Load this LISP file or put it into your startup suite for future use. This tells AutoCAD to ask the user to pick a block (e.g., your title block); then AutoCAD makes a selection set of all blocks of the same name across all tabs of your drawing. This set becomes the one used to create the text file for the export into Excel. The standard AttIn command is then used to import the edited information back into your drawing. There you have it: all title blocks can now be edited in one fell swoop.”

Notes from Cadalyst Tip Reviewer Brian Benton: I had trouble modifying the ATTOUT.LSP file in my version of AutoCAD 2011, but the author provided a copy of the file for me that works. You can either try to edit it yourself, or use the routine provided with this tip. Using AttOut and AttIn in sequence can really help save editing time. Before sheet sets, this was a trick you could use to update title block info. You can also update other block data, such as drainage structures in a civil design. The process is simple: Extract the block info with AttOut (or in this case, attoutmulti). That creates a TXT file that you can easily open in a spreadsheet (or Notepad even) and edit as needed. Then use the AttIn command to import the new data into the blocks in your file. This change to the LISP file makes it more powerful.

Average Rating:

5

User comments

Comment by Banik,Arnab

Posted on 2016-03-31 09:06:12

Hello, this looks like an awesome idea. I tried running the code but
everytime it is giving me the message "No valid objects selected". I have
made sure the attoutmulti lisp looks exactly like you mentioned and also
compared it with attout program. If you can provide me with any input, that
will be really helpful!
Thanks