查看单个帖子
旧 2009-04-25, 05:46 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 (command "._open")为什么无效?!

(command "._open")为什么无效?!
www.dimcax.com
(command "._open")为什么无效?!
(command "._open")为什么无效?!
d
我也同有此困惑
我也同有此困惑
d
出处
(defun openfile(filepath activate / ofile)
(vl-load-com)
(if(findfile filepath)
(if
(vl-catch-all-error-p
(setq ofile
(vl-catch-all-apply
'vla-open
(list
(vla-get-documents
(vlax-get-acad-object)) filepath))))
(alert
(strcat "error.\n can't open file: " filepath))
(if activate(vla-activate ofile))
); end if
(alert
(strcat "file not found: " filepath))
); end if
ofile
); end of openfile
例如:
(openfile "c:\\acad_out_to_12d.dwg" t)
d
我也遇到 了这样的问题,明明那些文件都有
(command "._open")有时有效,有时无效,
d
文档模式导致的...控制的系统变量是sdi
输入 sdi 的新值 <0>: 1
命令: (command "._open")
._open
输入要打开的图形文件名 <.>: nil
输入要打开的图形文件名 <.>:
命令:
sdi
输入 sdi 的新值 <1>: 0
命令: (command "._open")
._open
命令: nil
d
open d:\新建文件夹\2367-(01)-015-由于村123.dwg ccc qsave close
open d:\新建文件夹\2343-(07)-081-宽口村123.dwg ccc qsave close
这个scr,有时能执行完,有时就open无效
我从来没有设置过sdi参数,有时就open无效,应该不是sdi的问题吧
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)