几何尺寸与公差论坛------致力于产品几何量公差标准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(C++) (http://www.dimcax.com/hust/forumdisplay.php?f=34)
-   -   【转帖】取得cad当前dwg路径 (http://www.dimcax.com/hust/showthread.php?t=7212)

yang686526 2009-04-16 09:19 PM

【转帖】取得cad当前dwg路径
 
取得cad当前dwg路径
取得cad当前dwg路径
下面代码用来获取当前dwg的存储路径,
如果是还没有保存的图形文件,取得的路径是系统默认的路径,
struct resbuf dwgname, dwgpath;
cstring strfilepath;
acedgetvar(_t("dwgname"), &dwgname);
acedgetvar(_t("dwgprefix"), &dwgpath);
strfilepath.format(_t("%s%s"), dwgpath.resval.rstring, dwgname.resval.rstring);
复制代码


所有的时间均为北京时间。 现在的时间是 05:39 AM.