0 Members and 1 Guest are viewing this topic.
(defun c:test (/ ss1 ss2) (setq ss1 (car (entsel "\nSelect an object first"))) (setq ss2 (car (entsel "\nSelect an object second"))) (if (eq ss1 ss2) (alert "\nThis object is same entity") ) ; if (if (not (eq ss1 ss2)) (alert "\nThis object is not same entity") ) ; if (princ) )
How could I compare entity names to make sure they are not equal? If I wanted to test to see if the were equal I could use (eq Ent1 Ent2) & get "T" but (/= Ent1 Ent2) I also get "T"!
(if (eq (car (entsel)) (car (entsel))) (alert "same") (alert "not same"))