我认为他可能期待着这样的事情:
- (defun C:test ( / *error* lst e )
- (defun *error* (msg) (princ "\nSorry that I forced you to press Esc, to exit!") (princ))
- (if (and (car (setq lst (list (getpoint "\nFirst point: ")))) (apply 'and (setq lst (append lst (list (getpoint "\nSecond point: " (car lst)))))))
- (while
- (not
- (and
- (setq e (car (nentsel (strcat "\nDistance to fill is: "" (rtos (apply 'distance lst)) "" units, Select text/mtext/attrib."))))
- (vl-position (cdr (assoc 0 (entget e))) '("TEXT" "MTEXT" "ATTRIB"))
- (not (vl-catch-all-error-p (vl-catch-all-apply 'vla-put-TextString (list (vlax-ename->vla-object e) (rtos (apply 'distance lst))))))
- )
- )
- e
- )
- )
- (princ)
- );| defun |; (or vlax-get-acad-object (vl-load-com)) (princ)
|