Inserting a field through the FIELD dialog takes half a dozen clicks. When you need forty of them, all referencing the same property, that becomes a genuine waste of an afternoon. FieldStamp lets you define a single command that does the whole thing in two picks.
What FieldStamp does
Three ready-made commands come with it. AREASTAMP — pick an object, pick a point, get text showing its area. LENGTHSTAMP — the same for length, as MText, with a Length: prefix and a 0.1 conversion factor applied. STYLESTAMP — reads a style name into an existing text object.
These are examples as much as tools. The point is to copy the pattern at the foot of the file and make your own.
Building one takes a single line:
(defun c:MYSTAMP nil (FieldStamp:Insert "Area" "%lu6%qf1" 2))
How to use it
- Load the routine with
APPLOAD, or put it on your support file search path. - Try
AREASTAMP,LENGTHSTAMPorSTYLESTAMPto see the pattern working. - To build your own, add one line following the
MYSTAMPexample, giving it a property, a format code and a mode. - Load the file again and your command exists.
How it works
The three arguments are all there is to it.
Property — the object property the field reads: Area, Length, Radius, Layer, StyleName.
Format — the field formatting code, or "" for none. %lu6 decimal units, %pr3 three decimal places, %ps[Length:,] prefix the value with Length:, %ct8[0.1] multiply by 0.1 for millimetres to centimetres, %tc1 force upper case.
Mode — 1 writes into existing text, MText or an attribute; 2 creates a new TEXT object at a picked point; 3 creates a new MTEXT object at a picked point.
The easy way to find the arguments is to build the field once through the normal FIELD dialog until it displays exactly right. The dialog shows the finished expression along the bottom:
%<\AcObjProp Object(%<\_ObjId 2129673136>%).Area \f "%lu6%qf1">%
The property and the format code are both visible in it — Area and %lu6%qf1 — and can be read straight out. FIELDSNOOP in this library will also report the formatting code of any existing field.
Notes and limits
- This is a toolkit, not a finished tool. The three supplied commands are demonstrations of the pattern.
- Property names are ActiveX names, so they must match what the object actually exposes. Run
XRAYon an object to see the full list. - Mode 1 writes into an existing object and will replace what is there.
- Reload the file after adding a command for it to exist.
Download and details
| Name | FieldStamp — a toolkit for building your own one-key field commands |
| Download | FieldStamp.lsp — 11.6 KB, plain AutoLISP source. Downloads directly; no zip to unpack. |
| Type | AutoCAD AutoLISP routine |
| Commands | AREASTAMP, LENGTHSTAMP, MYSTAMP, STYLESTAMP |
| Requires | the ActiveX layer (loaded automatically by the routine with vl-load-com). |
| Source size | 11.6 KB, 280 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
- FIELDSNOOP LISP — read the formatting code out of a field you already like
- XRAY LISP — list every property name an object exposes
- FIELDMATH LISP — build a live calculation rather than a single property
- More free AutoLISP routines on this site
- Wisey’s Steel Shapes — free structural steel section drawing program