Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi again, Im trying to select the two closer points to another in a selection set, and something wrong when adding the second point to a selection set on the subfunction . I dont know why the second
(defun minusLenth (s ss2) (repeat (setq i (sslength s)) (setq i (1- i) n (ssname s i) d (setq d (distance c (cdr (assoc 10 (entget n))))) ) (if l (and (< d l) (setq l d o n ) ) (setq l d) ) ) (setq ss2 (ssadd o ss2)) ) (defun c:86 () ;; Tharwat - 27.May.19 ;; (setq ss2 (ssadd)) (setq s nil) (setq p nil) (princ "\nSelect point objectSSSS :") (if (and (setq s (ssget '((0 . "POINT")))) (setq p (ssname s 0)) (setq e p c (cdr (assoc 10 (entget e))) s2 (ssdel e s) ) ) ;and (minusLenth s2 ss2) ) (setq s3 (ssdel (ssname ss2 0) s2)) (minusLenth s3 ss2) (sssetfirst ss2 ss2) (princ) )
Thanks as always
Solved! Go to Solution.