@Anonymous wrote:
.... Now, how do I make it work for other geometry (circles, arcs, polygons....
It will already do polygons, at least any made with the Polygon command, since what that makes is a Polyline. If a polygon is made up of separate Lines, that would need to be done by marking the Lines rather than the polygon as a whole.
That would not be difficult. But clarify at what location(s) in relation to specific entity types you would want Points added:
LINE: both end points? also midpoint?
CIRCLE: center? also quadrant points?
ARC: end points? center? midpoint? any quadrant point(s) that are within the sweep of the Arc?
ELLIPSE: as with Circle? if partial, as with Arc?
SPLINE: endpoints? any fit or control points?
POLYLINE: in addition to vertices, perhaps also midpoints of segments such as get grips when selected?
BLOCK: insertion point? anything on internal geometry [harder than the preceding possibilities]?
RAY? XLINE? etc., etc.....
Things other than geometry per se [TEXT, MTEXT, DIMENSIONS, etc.]?
And in the case of things that meet where each one should get a Point [e.g. contiguous Line ends], a "plain" routine would place two [sometimes more] Points. Should it check whether there's one there already, and add one only if there isn't?
In the case of midpoints, for whatever entity types you would want those marked [including Polyline segment midpoints if you choose that option], check out MarkMidPoints.lsp, available here. Points are just one of the possible markers it can place.
Kent Cooper, AIA