KUMAR777 Posted January 31, 2019 Posted January 31, 2019 Dear all, i need a lisp that will check ,end of polyline is snapping with any polygon aren't ? in my working drawing they need to snap polyline end with any Polygons. it may be some times at intersection and some times mid of the polygons. so please help me with a lisp. that will check whether end of the polyline is snapping to the polygon aren't. i have so many polylines and polygons. its taking very long time to check whether all the polyline snapping to the polygons arent . plz help me. thanks snapping.dwg Quote
Roy_043 Posted January 31, 2019 Posted January 31, 2019 If I understand you correctly you want to identify polylines that do not have a block inserted at their start and end point. This is possible. Sadly one of your blocks has been badly designed: The insertion point of the FOC block seems totally illogical. The code below works for the other blocks. (defun KGA_Conv_Pickset_To_ObjectList (ss / i ret) (if ss (repeat (setq i (sslength ss)) (setq ret (cons (vlax-ename->vla-object (ssname ss (setq i (1- i)))) ret)) ) ) ) (defun c:Test ( / end polyLst ptLst ss ssOut sta) (if (setq ss (ssget "_X" '((0 . "INSERT,LWPOLYLINE")))) (progn (foreach obj (KGA_Conv_Pickset_To_ObjectList ss) (if (= "AcDbBlockReference" (vla-get-objectname obj)) (setq ptLst (cons (vlax-get obj 'insertionpoint) ptLst)) (setq polyLst (cons obj polyLst)) ) ) (setq ssOut (ssadd)) (foreach poly polyLst (setq sta (vlax-curve-getstartpoint poly)) (setq end (vlax-curve-getendpoint poly)) (if (not (and (vl-some '(lambda (pt) (equal pt sta 1e-8)) ptLst) (vl-some '(lambda (pt) (equal pt end 1e-8)) ptLst) ) ) (ssadd (vlax-vla-object->ename poly) ssOut) ) ) (sssetfirst nil ssOut) ) ) (princ) ) 1 Quote
sekhar Posted December 24, 2019 Posted December 24, 2019 Hi, Good day,I am using Autocad 2018,I need lisp for two main things 1) I want to check the continuty check for multiple layer should be snapping with muliple layers e. Example:a) one electrical cable should be snap with other electrical cable or Junction box or fence or lamp post and etc. b) if pipe line need to snap with other pipe line with T BEND or fence or Pipe rack or water well and etc. 2)If i want to select one feature then need to select all the above ground layer and under ground layer with all the snaping points. Thanks in advance sekhar J 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.