这个怎么样。。。
- (defun c:Test (/ #Choice #Suffix #SS)
- (vl-load-com)
- (and
- (not (initget 0 "1 2"))
- (setq #Choice (getkword "\nDimension Suffix (1 = ½/2 = ¼) [1/2]: "))
- (cond ((eq #Choice "1") (setq #Suffix "½"))
- ((eq #Choice "2") (setq #Suffix "¼")))
- (setq #SS (ssget ":L" '((0 . "DIMENSION"))))
- (foreach x (mapcar 'vlax-ename->vla-object
- (vl-remove-if 'listp
- (mapcar 'cadr (ssnamex #SS))))
- (vla-put-textsuffix x (strcat " " #Suffix """))))
- (princ))
|