Field that updates from LengthTotal and AreaTotal command ouputs?

mattv4F4AG
Explorer

Field that updates from LengthTotal and AreaTotal command ouputs?

mattv4F4AG
Explorer
Explorer

So I'm trying to make a field that updates automatically for a sum of all the areas of objects on a layer and also a field that updates for the sum all the lengths of polylines on a layer.

 

This lee-mac function is close but if I add more areas to a layer, I have to recreate the field again

https://www.lee-mac.com/lengthfield.html

 

My version of CAD has two commands that get area of layer items and length of layer items. LengthTotal and AreaTotal. Is there a way to have a field that runs this command for a particular layer and then displays the output? Goal is to have it where if I make changes in the drawings linework, the fields update to display the correct areas and lengths. I always want these to be displayed in SQ. FT. and Linear FT. 

 

Any tips are appreciated on how to do this. 

 

0 Likes
Reply
133 Views
3 Replies
Replies (3)

jreidKVSUZ
Advocate
Advocate

This might not be what you want. But give it a try and see. Have your boxes ready.

 

Type FIELD at the AutoCAD command-line and press ENTER to open the Field dialog. Select Objects from the 'Field Category' drop-down menu. Select Object from the 'Field Names' section. Select an object (with area) from the drawing by clicking the object selection button adjacent to the 'Object Type' box.

 

Now anytime you stretch your box, the number will update automatically. If you want to add the Layer, select the Layer under the Object and do the same as your did for your AREA.  One of the best thing about this is... once you set it up as you want. Copy your Box around and adjust as needed and it will update. If you copy the TEXT only to another box, no problem, double click onto the Field and RE-SELECT your new BOX / CIRCLE / ETC and say ok. It will now show that Boxes information.

 

See images below.

 

Hope this helps!

JRR!

jreidKVSUZ_0-1737584377628.png

 

 

0 Likes

cadffm
Consultant
Consultant

Hi,

there is no field function like this.

 

1. You need a modified code what will "create or update these field.

    What means: Create the field, or if present, change the fieldcode.

    This is possible if the program can search for it. For example: Check for Text object on layer "myareas" or check for Text, start with "All length" or whatever.

 

  2. Non programmers would use DATAEXTRACTION instead fields.

   

 

Sebastian

0 Likes

paullimapa
Mentor
Mentor

As other's have responded there's no FIELD option that would check if objects (in this case closed PLINES) are added or erased and then provide an updated value for the Area and Perimeter value for you. My AOL app has an Area Perimeter Link (APL) command comes close but you'll still have to select or reselect the closed PLINES again every time you add or subtract additional PLINES. But at least you'll get an updated Area & Perimeter value if you modified the existing PLINES:

Area Object Link (AOL) | AutoCAD | Autodesk App Store

paullimapa_0-1737585647212.png

 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes