几何尺寸与公差论坛------致力于产品几何量公差标准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)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   【转帖】related to quasi system variable (http://www.dimcax.com/hust/showthread.php?t=18405)

yang686526 2009-05-07 12:52 PM

【转帖】related to quasi system variable
 
related to "quasi" system variable
related to "quasi" system variable
i have included the following lines in our project...
#ifndef _toolkit_in_dll_
odrx_declare_static_module_entry_point(dbcommandsm odule);
odrx_begin_static_module_map()
odrx_define_static_application("dbcommands", dbcommandsmodule)
odrx_end_static_module_map()
#endif
in the constructor of our database class , we call something as below
#ifndef _toolkit_in_dll_
odrx_init_static_module_map();
#endif
odinitialize(&m_svcs);
//str contains file name...
m_pdb = m_svcs.readfile ((lpctstr)str); //m_pdb is oddbdatabaseptr
:drxdynamiclinker()->loadapp("dbcommands",false);
still when we open many of the autocad drawings and type some system variable values like backz , ctab , i get an "invalid input"error.
what can be the possible reason? i am using dwgdirect 1.14 and use .lib version
does this happen with all drawings or with some of them?
if with all: does loadapp() return non-zero value?
if with some drawings: what happens if you load file with recoverfile()? and could you send me a sample of such dwg?
sergey slezkin
the problem is happening with certain drawing files only and getsysvar() call for "quasi" system variable fails with them.
to check the return value , i am now using as below
odrxmoduleptr ptr = :drxdynamiclinker()->loadapp("dbcommands",false); and the value returned is not null. i realize that drawings created in our application also fails in reading the "quasi" system variables when it contains certain type of entity. for example , if create a "circle" in our application (it gets appended to oddbdatabase as well) and further type "backz" , the call fails. however this behavior does not happen if i create entities like line , pline etc.
what could be the reason? i have used recoverfile() and this does not solve the problem.
i have attached to this , one of the file in which i have faced the problem.
attached files (30.2 kb, 2 views)


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