查看单个帖子
旧 2009-05-07, 12:52 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】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)
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)