0 Members and 1 Guest are viewing this topic.
(if (setq n 0 pl nil ss (ssget '((0 . "POINT"))) )
(if (and (setq n 0 pl nil ss (ssget '((0 . "POINT")))) (if ss (if (> (sslength ss) 1) t) t)) (progn ;;progn code ))
When the number of points is 1 of the code will go Eorror.
Code - Auto/Visual Lisp: [Select](if (setq n 0 pl nil ss (ssget '((0 . "POINT"))) go (> (sslength ss) 2) ) (progn ...
(sslength nil) will error
Quote(sslength nil) will error So... will pulling the plug!
If that is indeed your attitude, why bother to include any error trapping at all...?
(princ (strcat "\n Select Points")) (if (and (setq ss (ssget '((0 . "POINT")))) (> (sslength ss) 2) ) (progn (vla-startundomark *AcadDoc*) (setvar 'CMDECHO 0) (setvar 'DIMZIN 0) (setq n 0 pl nil) (repeat (sslength ss) (setq pl (cons (cdr (assoc 10 (entget (ssname ss n)))) pl)