本帖最后由 htlaser 于 2019-9-3 15:44 编辑
- ;;;=================================================================*
- ;;;功能:向系统剪贴板写入文字
- ;;;引用地址http://bbs.mjtd.com/forum.php?mod=viewthread&tid=179272&highlight=%BC%F4%C7%D0
- (vl-load-com)
- (defun ZML-CLIP-SETSTRING (STR / HTML RESULT)
- (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( / NAME)
- (SETQ NAME (GETVAR "DWGNAME")) ;DWGNAME获取文件名 DWGPREFIX获取路径
- (ZML-CLIP-SETSTRING NAME)
- (PRINC "\n 复制文件名到系统剪贴板成功!!!")
- (PRINC))
|