几何尺寸与公差论坛------致力于产品几何量公差标准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)
-   -   【转帖】load ctb file (http://www.dimcax.com/hust/showthread.php?t=17105)

yang686526 2009-05-06 05:13 PM

【转帖】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


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