Autocad Lisp Insert Block With Attributes

Sequential numbering in AutoCAD blocks

When you want to edit attributes in AutoCAD most of us use the 'Attedit'. Alright, I admit that it's not much of a title block, but it's enough to give you the general.

If you need to insert blocks with incrementing numbers in attributes, or automatically renumber existing blocks in your DWG drawing, you can use the free CADstudio InsertC utility. InsertC contains two commands - InsertC and BlockC.

The InsertC command is a 'counting' version of the INSERT command. Ruby mine license key. It inserts a specified block and automatically fills its first (resp. specified) attribute with an increasing number in a series. You can either specify the block by picking an existing reference, or by entering its name.

Appeal to reason band If you didn't find a good account. Sign up to and help everyone, adding it to the list.

The BlockC command takes the selection set of existing blocks and fills (renumbers) their first (resp. specified) attributes with a series of incrementing numbers. You can sort the blocks (influence the numbering order) by their selection order, or by their X- or Y- coordinates.

Both autonumbering commands allow to specify the starting value of the counter, the prefix (you can also add leading zeroes) and the postfix for the generated number. You can also use the insertc:IncLISP variable to set the increment (if other than +1), insertc:Prec for decimal precision (for decimal increments) and insertc:AttNo to specify the attribute number. E.g. (setq insertc:AttNo 2)

The LISP utility InsertC is available for download on

See the animated sample (click to enlarge):