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))
Add this line right above the last parenthesis:
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.
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.
Windows 7 Prof. x64
HP Z400 Workstation
Intel(R) Xenon(R) CPU
W3550 @ 3.07GHz
6.00 GB RAM
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.
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.
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.
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.
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.