
As long as it keeps dropping we are happy (setq best_distance 1000000) and we will search for something better. (setq pts_ss (ssget (list (cons 0 "POINT")))) (cons 0 "ARC,CIRCLE,ELLIPSE,LINE,LWPOLYLINE,POLYLINE,SPLINE") (defun c:sto ( / en obj pts_ss ss_len c pten ptobj pted pt pt2 this_is_the_point best_distance) So if you select multiple polylines it will draw a line to the closest one. I think it does what you require,īut it has remnants of the old code, so it has lines of code that are not needed anymore. I changed it to select points, and to draw lines instead of moving the blocks. My code used to do a similar thing (you can find it in the list of my replies on this forum): move blocks perperdicular to multiple polylines, first find the closest polyline to the block.
