几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   ObjectARX(AutoLISP) (http://www.dimcax.com/hust/forumdisplay.php?f=178)
-   -   (command "._open")为什么无效?! (http://www.dimcax.com/hust/showthread.php?t=10366)

yang686526 2009-04-25 05:46 PM

(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的问题吧


所有的时间均为北京时间。 现在的时间是 08:56 PM.