(defun nssget (msg filt fun / ss) (if fun (while (progn (princ msg) (not ss)) (if filt (setq ss (ssget ":S" filt)) (setq ss (ssget ":S")) ) (mapcar fun (ss->lst ss)) ) ) ) ;; 返回选择集的图元表 (defun ss->lst (ss / enamep) (setq enameP '(lambda (x) (= (type x) 'ename))) (vl-remove-if-not enameP (mapcar 'cadr (ssnamex ss))) ) ;;;;(nssget "\n选择需要定距的尺寸" '((0 . "DIMENSION")) '(lambda (x) (alert "a")))
|