Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Thanks again for your help.
I considered the following Lisp to determine whether two coordinates are the same or not.
Is there a better way?
line 0,0 100,0
line 0,0 0,100
(defun c:test3 (/ id1 id2 pt1 pt2 ret )
(setq id1 (car (entsel)))
(setq id2 (car (entsel)))
(setq pt1 (assoc 10 (entget id1)))
(setq pt2 (assoc 10 (entget id2)))
(setq ret (= pt1 pt2))
(princ "\n= : ") (princ ret)
(setq ret (eq pt1 pt2))
(princ "\neq : ") (princ ret)
(setq ret (_is_same pt1 pt2))
(princ "\n_is_same : ") (princ ret) (princ)
)
(defun _is_same (p1 p2 / )
(and (= (car p1) (car p2)) (= (cadr p1) (cadr p2)) (= (caddr p1) (caddr p2)))
)
Saitoib
Solved! Go to Solution.