- (defun c:ts (/ e en p pt)
- (while (setq p (getpoint))
- (progn
- (cond
- ((null (setq e (nentselp p)))
- (princ "\nPoint does not lie on an LWPolyline.")
- )
- ((= 4 (length e))
- (princ "\nObject is Nested.")
- (setq e nil)
- )
- ((/= "LWPOLYLINE" (cdr (assoc 0 (entget (setq en (car e))))))
- (princ "\nObject is not an LWPolyline.")
- (setq e nil)
- )
- )
- (if (and e p en (setq pt (vlax-curve-getclosestpointto en (trans p 1 0))))
- (progn
- (command "_.BREAK" e "F" pt "@")
- (command "_.pedit" (entlast) "j" en "" "")
- )
- )
- )
- )
- )
|