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

yang686526 2009-05-07 12:40 PM

【转帖】recomputedimblock crash
 
recomputedimblock crash
recomputedimblock crash
hello everybody,
i am using the vc6md libraries version 1.14.1.0.
the following code :
oddbaligneddimensionptr dwgdim = oddbaligneddimension::createobject() ;
oddbblocktablerecordptr modelspace = pdatabase->getmodelspaceid().safeopenobject(oddb::kforwrit e) ;
modelspace->appendoddbentity(dwgdim) ;
dwgdim->setdatabasedefaults(pdatabase) ;
dwgdim->setdimensionstyle(pdatabase->getdimstylestandardid());
dwgdim->setdimensiontext("text");
dwgdim->setnormal(odgevector3d(0.,0.,1.)) ;
dwgdim->setdimlinepoint(odgepoint3d(0.,0.,0.)) ;
dwgdim->setxline1point(odgepoint3d(1.,0.,0.)) ;
dwgdim->setxline2point(odgepoint3d(-1.,0.,0.)) ;
dwgdim->usedefaulttextposition();
dwgdim->recomputedimblock() ;
crashes on recomputedimblock. my stack looks like this :
kernel32! 7c81eb33()
msvcrtd! _cxxthrowexception@8 + 57 bytes
oddbdimensionrecomputepeloader::getrecomputer(clas s oddbdimension *) + 172 bytes
oddbdimensionrecomputepeloader::recomputedimblock( class oddbdimension *) + 37 bytes
oddbdimension::recomputedimblock(bool) + 126 bytes
it seems to happen for all kind of dimension.
the recomputedimension.drx file is in the application directory.
i tried to add the line ":drxdynamiclinker()->loadapp("recomputedimblock").release();", after odinitialize, but it changed nothing.
has anyone got an idea ?
thank you in advance for help.
what does loadapp() return?
it seems that recomputedimblock.drx is missing in dll build or if you use static build the module is not included into your application.
see
sergey slezkin
just wrong libraries
it seems i was not linking with the good libraries. since i have been using the dd_x_dll.lib instead of the dd_vc6md_x.lib, the bug disappeared.


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