Over 1.081.000 registered users (EN+CZ). New 1D nesting and 3D nesting tools, updated Color converter. New AutoCAD 2025 commands and variables. Learn about twiGIS.
CAD tip # 6678:
Question
If you need to insert blocks with incrementing numbers in attributes, or automatically renumber a sequence of existing blocks in your DWG drawing, you can use the free ARKANCE InsertC utility. InsertC contains three commands - InsertC and BlockC and ODataC (plus InscOpt for setting options).
The InsertC command is a "counting" version of the INSERT command. 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.
The BlockC command takes the selection set of existing blocks (or multileaders with 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.
The ODataC command (since V1.13) works similarly as BlockC but processes the selected Object Data field (Map or Civil 3D object data, OD).
All 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:Inc LISP 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)
Since version 1.12 you can use the replacement pattern to display also the previous/next value, e.g. "TRM $ to $+" displays "TRM 74 to 75". You can also preset it with the LISP command - e.g.:
(setq insertc:RegEx "Terminal $ (from $- to $+)")
The LISP utility InsertC is available for download on Download. Load the VLX file with APPLOAD and start it by typing the INSERTC or BLOCKC commands.
See the animated samples (click to enlarge):