Area Label

Function Syntax AT (Table) / AF (File)
Current Version 1.9
Download AreaLabelV1-9.lsp
View HTML Version AreaLabelV1-9.html
Donate

Program Description

This program enables the user to annotate picked areas or selected objects with custom labels and either display the labels and associated areas in an AutoCAD Table Object, or write the data to file.

The program offers two modes of operation: Area to Table (AT) or Area to File (AF), depending upon the output desired by the user.

Area to Table

Upon calling the program with 'AT' at the AutoCAD command-line, the user is prompted to specify a starting number at which to begin labelling the selected areas. Following this, the user may either pick a point to create a new AutoCAD Table, or opt to select an existing table to which new data is to be appended.

Area selection may be accomplished in two ways: by picking bounded regions, or by selecting closed objects. Following the selection of an area, a label is placed in the centre of the selected area and a new row is added to the AutoCAD Table, displaying both the label and measurement of the selected area.

If an incorrect area is selected, the user can type 'Undo' to undo previous selections without exiting the program or needing to start over.

Furthermore, if desired, the program can use Fields to link the area labels and selected objects to ensure the table data will automatically update should a change be made.

Preview

AreaLabelV1-5.gif

Area to File

If the program is called with 'AF' at the AutoCAD command-line, the user is once again prompted to specify a starting number at which to begin labelling the selected areas; however, following this prompt, the user is prompted to create an output file to which the labels and associated area measurement data will be written. The file may be of Text, CSV or Excel format.

Upon exiting the area selection process, the output file is automatically opened so that the user may inspect the results.

Additional Features

An adjustment menu is included at the top of the program code to enable the user to make custom refinements to various elements of the program.

This menu allows the user to customise the table & file headings and titles and furthermore add optional prefixes and/or suffixes to the area labels (as demonstrated in the animation above) and area measurement data.

An arbitrary conversion factor may also be applied to the area measurement to enable conversion between square millimetres and square metres, for example.

Additionally, the option of whether to use Fields to link area and labels to those displayed in the Table may also be set, and formatting applied to the area Field for selected objects may be changed.

Preview

AreaLabelV1-3.gif

Instructions for Running

Please refer to How to Run an AutoLISP Program.

textsize

increase · reset · decrease

Designed & Created by Lee Mac © 2010