Field Formatting Code
Function Syntax | fieldformat |
Current Version | 1.1 |
Download | FieldFormatV1-1.lsp |
View HTML Version | FieldFormatV1-1.html |
Donate |
Program Description
This program enables the user to determine the field formatting code associated with the field expression held by a selected object.
Upon issuing the command syntax fieldformat at the AutoCAD command-line, the user will be prompted to select an annotation object containing one or more field expressions with formatting applied. Following a valid selection, the program will print the outermost (i.e. non-nested) formatting code applied to the last field expression held by the selected object to the command-line.
For a list of all formatting codes associated with every field expression held by the selected object, the user may consult the return of the LM:fieldformatting function defined in this program.
The program is compatible for use with Single-line Text (DText), Multiline Text (MText), Attributes, Multileaders & Dimensions containing one or more field expressions with formatting applied.
Example of Output
Upon selecting the following MText object containing a field expression referencing the length of an object, with several formatting options applied:
The program may display the following output at the command-line:
Command: FIELDFORMAT Select field: Formatting code: "%lu2%pr2%ct8[1000]%th44"
The formatting code associated with the selected field is highlighted in cyan above.
Instructions for Running
Please refer to How to Run an AutoLISP Program.