This is a short PSA to not forget about system variables in AutoCAD or Civil 3D. In today’s post, I am talking about a system variable that can help with inserting blocks with attributes. Blocks with attributes tend to fall into one of two categories, they have a few attributes OR they have pages of attributes. By default, AutoCAD prompts to review or modify the attribute value when inserting the block. In camp number one, this would be normal. Maybe I’m placing bore hole symbols and have an attribute to label or name the location. But what about camp number two? Do I really want to confirm every attribute at the command line or even in a dialog box? Probably not.
This brings us to the system variable – ATTREQ. Yes, I have no idea what this acronym stands for. But, I do know that it controls whether or not you are prompted to validate the attributes of a block on insertion. For instance, If I am inserting a title block with 40 some odd attributes that are all controlled via Sheet Set Manager, then I do NOT need to confirm nor edit the default values.
As with most system variables, this can be set to either ZERO or ONE. When set to ONE, you are prompted for attribute values while ZERO assumes or accepts the default values of all attributes. Setting this to ZERO when working with titleblocks on several drawings greatly improves my happiness. 🙂
If you’re working with attributes, one option is to make it multiple lines or like mtext.
If you “unlock” the position, then you can grip edit the width of this mtexty attribute. Should you need to revert an attribute from multi to single line, there is no option. For whatever reason, it cannot be turned off using properties. In fact, the only way I have found is via LSP. Here is that code for your programming pleasure. Simply paste it into a text editor and save it with a LSP extension and load it via APPLOAD in AutoCAD.
;command that converts multi-line attributes to standard attributes
(defun c:convertMattribute (/ ss i)
(if (setq ss (ssget '((0 . "ATTDEF"))))
(setq i 0)
(repeat (sslength ss)
(ssname ss i))
(setq i (1+ i))
OH, here’s a BONUS BONUS tip; attribute order. If you do need to revise the attributes, it’s likely you want them in a certain order. The easiest way to set the order is not worrying about it until the end of the block creation and use BATTORDER to define how they should sort in the attribute dialog!