Bad3d3 Posted April 10, 2012 Posted April 10, 2012 Hello all I need a lisp to type the area of a geometry by picking an internal point.. thanx for all Quote
Lee Mac Posted April 10, 2012 Posted April 10, 2012 Prompt user for point (getpoint) Store value of (entlast) Use BPOLY command with selected point to generate a Polyline. Check value of (entlast) against previously stored value, if not equal, a Polyline has been successfully created. Use vlax-curve-getarea on the Polyline entity returned by (entlast), or retrieve the Area property of the VLA-Object equivalent. Report the area. Delete the Polyline Quote
irneb Posted April 11, 2012 Posted April 11, 2012 Lee, that would work for simple areas. If you have an area with holes cut out of it, the bpoly (or boundary command - same thing) would generate several polylines. So you'd either need to subtract their areas from one another - which might be difficult to figure out which from which. Or change the Advanced options --> Object type of the boundary command to generate a single Region instead. Quote
Lee Mac Posted April 11, 2012 Posted April 11, 2012 Good point, use a Region over Polyline. I've already gone down this road in my Area Label program Quote
Bad3d3 Posted April 19, 2012 Author Posted April 19, 2012 thanx lee for help >>but when I loaded your area label lisp in my cad is said "error: bad function: 41" and thanx irneb for concern Quote
Lee Mac Posted April 19, 2012 Posted April 19, 2012 thanx lee for help >>but when I loaded your area label lisp in my cad is said "error: bad function: 41"and thanx irneb for concern I can't see what could be causing that error, and I also can't seem to replicate the error when loading the program on my system. Is anyone else receiving this error when loading the Area Label program? Quote
pBe Posted April 19, 2012 Posted April 19, 2012 I tested your program Lee, I have to say I'm impressed. This: (defun _Select ( msg pred func init / e ) (setq pred (eval pred))...... Wicked programming . I still have much to learn. Thank you for sharing Lee Quote
Pradeep Kumar Posted June 16, 2019 Posted June 16, 2019 Is there any possibility to get the area without using boundary command and also I would like to know the coding of boundary command (coding by Autodesk) just to know how it works. Quote
BIGAL Posted June 19, 2019 Posted June 19, 2019 If its lines or plines no arcs there is a mathematical formula for areas based on points. Arcs add an extra level of complexity. (coding by Autodesk) Autodesk pay mathmaticians no doubt a lot of money to make Autocad smart so you will never be told how they did it. Just google Boundary you will find lots of theory about boundaries. 1 Quote
Pradeep Kumar Posted June 24, 2019 Posted June 24, 2019 Thank you. I would like to know whether there is a possibility to fetch the area of a closed polyline when the point is picked inside the closed polyline without using AutoCAD boundary command. Quote
marko_ribar Posted June 24, 2019 Posted June 24, 2019 54 minutes ago, Pradeep Kumar said: Thank you. I would like to know whether there is a possibility to fetch the area of a closed polyline when the point is picked inside the closed polyline without using AutoCAD boundary command. It would be far more easy and reliable if you could pick desired polyline instead of picking inside it, whereas there may be more entities that may interfere point inside polyline checking... Quote
Pradeep Kumar Posted June 24, 2019 Posted June 24, 2019 55 minutes ago, marko_ribar said: It would be far more easy and reliable if you could pick desired polyline instead of picking inside it, whereas there may be more entities that may interfere point inside polyline checking... What if I would like to retrieve area between two intersecting closed polyline. Quote
BIGAL Posted June 26, 2019 Posted June 26, 2019 Whats wrong with the bpoly methods already mentioned once you get the area you can erase the bpoly if you want. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.