之所以要右键确认,是因为whlie语句,你把while语句去掉就行了。- (vl-load-com)
- (defun ZML-CLIP-SETSTRING (STR / )
- (and (= (type STR) 'STR)
- (setq HTML (vlax-create-object "htmlfile"))
- (setq RESULT (vlax-invoke (vlax-get (vlax-get HTML 'PARENTWINDOW) 'CLIPBOARDDATA ) 'SETDATA "Text" STR ))
- (vlax-release-object HTML))
- )
- (defun c:tt ( / )
- (if (setq str(ssget ":E:S" '((0 . "TEXT"))))
- (progn
- (setq str(cdr(assoc 1(entget(ssname str 0)))))
- (setq str1(ssget ":E:S" '((0 . "TEXT"))))
- (setq str(strcat str "-"(cdr(assoc 1(entget(ssname str1 0))))))
- (ZML-CLIP-SETSTRING str)
- )
- ))
|