Community
Civil 3D Forum
Welcome to Autodesk’s Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Calc Area in Acres

16 REPLIES 16
Reply
Message 1 of 17
hunterjr81
8553 Views, 16 Replies

Calc Area in Acres

Hello,

 

Before 2011 came along we had a lsp routine for acre that would give us the area of any polylines in acres. In 2011 this same routine does not work. I can enter in "acre" at the command line and it ask to pick polyline for area. When I click on the polyline it just says "nil"

 

Anyone know why this is. The code we have for acre is below.

 

(defun c:ACRE (/ )
        (setq pentity (car(entsel "\nPick polyline for area: ")))
        (command "area" "e" pentity)
        (setq area1 (getvar "area"))
        (setq acreage (/ area1 43560.0))
        (setq acre (rtos acreage 2 2))
        (setq art (strcat " = " acre " Acres" (chr 13)))
        (setq sqrft (strcat "Area = " (rtos area1 2 0) " SqFt"))
        (setq art_sqrft (strcat sqrft art))
        (PROMPT art_sqrft)
)

16 REPLIES 16
Message 2 of 17
wfberry
in reply to: hunterjr81

I cannot help on your code but just offer a plan B.

 

Autocad's FIELD command can be a fairly easy method.

 

Bill

 

Message 3 of 17
Jeff_M
in reply to: hunterjr81

Add this line right above the last parenthesis:

(princ)

 

THe command works, the nil is returned by the lisp so it runs the result out of view. Adding the (princ) stops the nil from displaying.

Jeff_M, also a frequent Swamper
EESignature
Message 4 of 17
Maine-iac
in reply to: hunterjr81

I know the direct question was why doesn't the lisp work but....How about setting your default area label style for CreateParcelFromObject to something setup for acres and just create temporary parcels from the polylines with acre labels? Just a suggestion for using the capabilities of the software rather than deferring to old lisp routines.

Civil 3D 2022.1
Windows 10 x64
HP ZBook 15 G5
Intel(R) Core(TM) i7-8750H CPU @ 2.60GHz
32 GB RAM
Message 5 of 17
castled071049
in reply to: Maine-iac

I totally agree with Maine-iac... use parcels to give the areas. The only catch is best practice is to not have overlapping lines when creating parcels. So, no overlapping closed polylines on top of each other. Otherwise, parcels are the ticket, IMHO.

Message 6 of 17
dsigman
in reply to: hunterjr81

I went to the Lines/Curves menu and created a label I called AREA. It shows square feet and acres. I toggled the leader so it doesn't show. When I click on a closed polyline the label shows up on the place where I clicked. Then I drag the label to the center of the parcel.

 

Sorry but I just don't like the way working parcels makes them act like a block that I can't do much with. And while I'm complaining, why did they take a perfectly useable mapcheck function and complicate it so that you have to click on the labels to run a mapcheck instead of picking a polyline? What if you're not ready for labels? It makes for uneccessary work. 

Message 7 of 17
castled071049
in reply to: dsigman

Great job on the closed polyline label. I would never have thought of that.

 

Question... is the label dynamic? If you change the size of the polyline area, does the label update? Thanks.

Message 8 of 17
aecoursen
in reply to: castled071049

Question... is the label dynamic? If you change the size of the polyline area, does the label update?

 

Yes it does.  Works well when doing quantities.

Andrew Coursen PE & LS
v2014/64bit
Message 9 of 17
dsigman
in reply to: castled071049

Yes it is dynamic. It works the same as any other label.

Message 10 of 17
hunterjr81
in reply to: Jeff_M

Thanks Jeff_M!

 

Works perfect now. Alot of the work I do involves editing lines and keeping boundaries under certain acres and I like to be able to do a quick acre check on anything. And guys I realize I can utilize the parcel feature but I love using this little lsp for a quick check on any boundaries. Its simple and easy.

 

Message 11 of 17
mjung
in reply to: dsigman

Thanks for the Line Label tip DSIGMAN!!!!

 

I've been looking for something like this. Being able to display the area dynamically without having to convert to a Parcel is great. My polyligns were overlapping and like an earlier post stated the overlapping Parcels don't play well. Tried the field method but it's to cumbersome to add new labels to other objects.


Civil 3D 2024 / Windows 11 Pro (64bit)
Intel Core I7 @3.30GHz / 32gig RAM / NVIDIA Quadro K2200
Message 12 of 17
dsigman
in reply to: mjung

You're welcome.

Message 13 of 17
randyowens3203
in reply to: dsigman

This could be just what I'm looking for. But, is there a way to keep it from labeling every single line segment in the bpoly? Also, I can not keep the label from including the tag number.

Randy A. Owens
Southland Engineering, Inc.
Win 7 64BIT
C3D 2013
Message 14 of 17
dsigman
in reply to: randyowens3203

I just label a closed polyline on any one of the segments and the label returns the area. I've configured it for square feet and acres. I used the General Overall Area variable to create it.

 

I'm not sure what you're getting at with the tag number. In the Label Style Composer, in the Tabel Tag group, I suspect you may have the "Used In" setting set to "Label and Tag Modes"  instead of just "tag mode":

 

I'll try to attach screen shots of the settings I used.

Message 15 of 17
randyowens3203
in reply to: dsigman

I've got it now. Thanks.

Randy A. Owens
Southland Engineering, Inc.
Win 7 64BIT
C3D 2013
Message 16 of 17

Here is an old (but still good) post using line labels for elevations. At the end, I have an example using a line area label for silt fence.

 

http://civil3drocks.blogspot.com/2006/06/label-style-for-calling-out-elevation.html

Dana Probert, P.E.
Technical Marketing Manager, Civil Engineering
Autodesk
Blog: BIM on the Rocks
Learn More About BIM for Infrastructure
Message 17 of 17
Sinc
in reply to: castled071049

I've been getting frustrated in C3D 2011/2012 by the fact that some Parcel curve labels have incorrect deltas...  Seems to happen most when using large coordinate values, such as ones related to State Plane.  I think it's created by a precision error, which causes C3D Parcels to include erroneous extra very tine curve segments (with 0.000 length, but a delta angle) that gets "added" to the value shown in the label.  Very disturbing, since it can cause plats to show incorrect delta angles in curves, and the problem is very hard to catch.

 

Just really confused by how I never had this problem in C3D 2010 and earlier...

Sinc

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


Autodesk Design & Make Report