查看单个帖子
旧 2009-05-06, 05:13 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】load ctb file

load ctb file
load ctb file
have some problems loading a plotstyle file in dwgdirect 2.1.1.
some code snippet:
code:
odstreambufptr pfilebuf;
oddbsystemservices* pss = odsystemservices();
pss->accessfile(sfilename, oda::kfileread); // sfilename is the ctb file

pfilebuf = pss->createfile(sfilename);
odpsplotstyletableptr pplotstyletable;
if(pfilebuf.get())
{
odpsplotstyleservicesptr ppss = (odpsplotstyleservices*)pss->loadmodule(odps_plotstyle_services_appname, false);
if(ppss.get())
{
pplotstyletable = ppss->loadplotstyletable(pfilebuf);
}
}
loading the module for the plotstyleservices returns an error, 'file not found ...'
i included
code:
"ps/plotstyles.h"
and defined (for static module)
code:
...
odrx_declare_static_module_entry_point(odpsplotstyleservicesimpl);
...
odrx_define_static_application(odps_plotstyle_services_appname, odpsplotstyleservicesimpl)
maybe there is some fault in my code, but i don't have any idea how to correct it.
thanks for help
woho
are you sure you use static (non-dll) dd configuration?
sergey slezkin
sorry, it was my fault. forgot odrx_init_static_module_map();
for the other modules, like modelermodule, exrastermodule, and so on, i never declared odrx_init_static_module_map(); and it worked, or seems to work.
woho
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)