本帖最后由 77077 于 2023-1-2 13:16 编辑
谢谢楼主分享,
顺便提个小建议,可以将两个命令整合起来。
- (and
- (setq ss (ssget '((-3 ("*")))))
- (setq xdataFile (xdata->file ss))
- (setq WSshell (vlax-create-object "WScript.Shell"))
- (vl-catch-all-apply 'vlax-invoke (list WSshell 'run (strcat "notepad.exe " xdataFile) 8 :vlax-true))
- (vl-catch-all-apply 'vlax-release-object (list WSshell))
- (fileXdata->objs ss xdataFile)
- (vl-file-delete xdataFile)
- )
|