Making one field stand out on a drawing usually means editing every block that carries it. TAGTINT does the whole sheet in one go: select the blocks, tick the tags you want, pick a colour, and only those attributes change — every other attribute in the same blocks is left exactly as it was.
What TagTint does
The typical job is consistency. Every DOOR_REF on the sheet should read red; every ROOM_NAME should stay black. Doing that by hand across sixty door blocks is an afternoon and three missed ones. TAGTINT does it in one selection.
Select some attributed blocks and a dialog lists every distinct tag found across them — not every attribute, but each tag name once. Tick the ones you want, choose a colour, and the change is applied to matching attributes in every selected block.
The colour applies to the attribute itself, independently of the block it sits in. The block reference keeps its own colour, and so does every attribute you did not tick.
How to use it
- Load the routine with
APPLOAD, or put it on your support file search path. - Type
TAGTINT. - Select the attributed blocks. Only block references that actually carry attributes can be picked, and anything on a locked layer is skipped.
- The Attribute Tag Colour dialog opens, listing every distinct tag across the selection, sorted alphabetically.
- Tick one or more tags. The list is multi-select, and the first entry is pre-selected so OK is never meaningless.
- Click Select Colour or the colour swatch to open the standard AutoCAD colour dialog, and pick a colour.
- Click OK. The count of recoloured attributes prints at the command line.
How it works
The selection is filtered with (66 . 1), which restricts it to block references that carry attributes, and “_:L”, which excludes locked layers. Blocks with nothing to recolour cannot be picked in the first place.
Every attribute across the selection is then collected as a pair of tag name and attribute object. That pairing is the whole design: the tag names can be reduced to a distinct, sorted list for the dialog, while the objects themselves stay available to recolour once the user has chosen. Nothing has to be searched for twice.
Constant attributes are included. The ActiveX GetAttributes method returns only variable attributes, so GetConstantAttributes is called as well and the two lists joined. Without that second call, constant attributes would be invisible to the routine even though they are plainly visible in the drawing — a difference that is genuinely confusing when you hit it, because the tag you can see on screen simply does not appear in the list.
The dialog itself is written out to a temporary .dcl file at run time, loaded, used, and deleted immediately afterwards — including when you cancel. That keeps the routine a single self-contained file with no companion dialog file to install alongside it or lose. Every step of building the dialog is chained through one condition, so a failure at any point — disk full, no write permission on the temp folder, a syntax error in the DCL — drops straight to the cleanup rather than leaving a dialog handle open.
A multi-select list box returns its selection as a string of space-separated indices, such as “0 2 5”. Wrapping that in brackets and reading it converts it to a list of integers in one step, which are then mapped back to the tag names they point at:
(read (strcat “(” choice “)”))
The chosen colour is remembered between runs in a global, so repeated use does not mean re-picking the same colour every time. If you cancel the colour picker, the previous colour is kept rather than dropping to nil and failing later on.
The ActiveX selection set is deleted explicitly once the attributes have been collected. ActiveX selection sets persist in the document until removed, and leaving them behind is how a drawing ends up unable to create a new one.
Notes and limits
- Attributes on locked layers are not touched. The selection filter excludes them, so a locked layer stays locked.
- The colour is set on the attribute, not the block. Redefining or reinserting the block will not preserve it — this changes existing references in the current drawing.
- Tags are matched by name across the whole selection. If two different blocks both use a tag called
REF, tickingREFrecolours it in both. That is usually the point, but it is worth knowing before selecting the whole sheet. - The whole operation is one undo group, so a single
Uputs every recoloured attribute back.
Download and details
| Name | TagTint — recolour chosen attribute tags across many blocks at once |
| Download | TagTint.lsp — 10.3 KB, plain AutoLISP source. Downloads directly; no zip to unpack. |
| Type | AutoCAD AutoLISP routine |
| Command | TAGTINT |
| Requires | the ActiveX layer (loaded automatically by the routine with vl-load-com); nothing extra — the dialog is written to a temporary file at run time and deleted again, so there is no .dcl to install. |
| Source size | 10.3 KB, 250 lines |
| Error handling | Yes — a *error* handler restores every system variable it changed, on cancel as well as on error. |
| Undo | The whole operation is wrapped in a single undo group, so one U reverses all of it. |
| Compatibility | AutoCAD (any release with AutoLISP), BricsCAD, ZWCAD, GstarCAD, ProgeCAD and other IntelliCAD-based platforms. AutoCAD LT needs a LISP enabler. No .NET, no ObjectARX, no installer. |
| Author | YZ, August 2026 |
| Licence | Free to use, supplied “as is” with no warranty. |
References
- UPDBLOCK LISP — change layer or colour inside block definitions
- FixBlock LISP — reset block entities to layer 0
- Block to BYLAYER LISP — reset block colours to BYLAYER
- More free AutoLISP routines on this site
- Wisey’s Steel Shapes — free structural steel section drawing program