本帖最后由 namezg 于 2011-11-22 21:57 编辑
(defun GetObjectDBXVer (/ version) (if (>= (setq version (atoi (getvar "acadver"))) 16) (strcat "ObjectDBX.AxDbDocument." (itoa version)) nil ) )
(setq AcadObject (vlax-get-acad-object)) (setq dbxDoc (vla-GetInterfaceObject AcadObject (GetObjectDBXVer))) (setq FileName "D:\\test.dwg") (setq VlaFileName (vla-Open dbxDoc FileName))
为什么上面的代码没问题,而下面的有问题呢,怎么解决下面的问题呢?
(setq AcadObject (vlax-get-acad-object)) (setq dbxDoc (vla-GetInterfaceObject AcadObject (GetObjectDBXVer))) (setq FileName "D:\\test.dxf") (setq VlaFileName (vla-Open dbxDoc FileName))
该贴已经同步到 namezg的微博
|