Area Lisp Autocad Download

35 views
Skip to first unread message

Abbey Synnott

unread,
Jan 10, 2024, 1:06:11 AM1/10/24
to matamoterc
So far so easy I'm sure you guys are thinking but I would like a few more bells and whistles:shock:! I would like the area to be shown in m and to the nearest whole number if it is less than 1 hectare. Once it is greater than or equal to 1ha I would like the number to be shown as X.xxha (eg divide the area by 10,000 and show to 2 decimal places).
area lisp autocad download
Thats the bells taken care of, now the whistle! I would like also to be prompted for the Lot number, which once I enter it, it adds that into the multiline text. If I enter nothing I would like it to just display the area.
So, for example, if I have an object which is 10,357m. I run the lisp, click on the object, it prompts for a Lot number, I enter in 2 say and then the lisp prompts me where to place the text. I select the spot and the centered multiline text entered is Lot 2 1.36ha (with Lot 2 being on one line and 1.36ha on the line below).
Thank you!!
It works fine, but I have two more questions, and asking you, if you can help me.
Using this lisp, i found out two strange things.
1. example: My units are set to 4 decimal numbers. in one case result shows 5 decimal numbers.
2. example: I choose few really big objects and result is 9.36016e+06. But I want to see whole real number (so I can use copy-paste option), not to calculate result ...is it possible at all?
How to fix this. Do I have to change something in my program settings or any of System Variables?
Upon issuing the command syntax A2F at the AutoCAD command-line, the user is prompted to make a selection of objects for which to retrieve the area; if more than one object is selected, the cumulative area for all objects will be displayed by the resultant MText Field.
The Field will display the sum of the areas of the selected objects, formatted using the Field formatting code specified at the top of the program - this formatting code may be altered to suit the user's requirements and is described in more detail below.
The program will also optionally prompt the user for a selection of objects whose lengths or areas are to be subtracted from the total. The user may dismiss this second prompt if no values are to be subtracted, or the prompt may be disabled completely by changing the subtraction prompt parameter supplied to the main function.
At this prompt, the user may select any number of Arcs, Circles, Ellipses, Hatches, 2D Polylines (light or heavy), Regions, or Splines. If the selected object is open, the area is computed as though a straight line connects the start point and endpoint.
The available commands offered by the program are defined at the very top of the program source code. Additional custom commands which target specific attribute tags, or which employ varying field formatting codes may be defined by the user to accommodate drawings in which lengths or areas must be expressed in a variety of formats.
The above custom command may be invoked at the AutoCAD command-line using the syntax myaf and targets an attribute with tag name "TAG1", prompting the user for a selection of objects whose areas are to be added to the total, followed by a selection of objects whose areas are to be subtracted from the total, with the resulting area formatted:
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 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.
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.
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.
I installed the lisp that calculates the total area of multiple objects at once, but it doesn't appear to be working. After I run the AreaM command and select the objects, the dynamic input/command line goes blank and I don't get a measurement.
35fe9a5643
Reply all
Reply to author
Forward
0 new messages