改了一下- (defun SSDrag (ss pt DragCommand / get-ss ss2 e cmdecho ret catchit)
- ;; ssdrag main:
- (setq cmdecho (getvar "cmdecho"))
- (setvar "cmdecho" 0)
- (setq doc (vla-get-activedocument (vlax-get-acad-object)))
- (vla-startundomark doc)
- (command "_.copy" ss "" "_non" "0,0,0" "_non" "0,0,0")
- (setq
- catchit (vl-catch-all-apply
- (function
- (lambda ()
- (command DragCommand ss "" pt)
- (while (/= "" (getvar "cmdnames")) (command pause))
- )
- )
- nil
- )
- )
- (vla-endundomark doc)
- (command ".u")
- (setvar "cmdecho" cmdecho)
- (if (vl-catch-all-error-p catchit)
- nil
- (getvar "lastpoint")
- )
- )
|