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

yang686526 2009-05-06 06:39 PM

【转帖】not that kind of class error
 
not that kind of class error
not that kind of class error
in processing block entities, my code encounters some blocks that cause a
not that kind of class
error, when it tries to call the explodetoblock(oddbblocktablerecordptr) function. on further analysis, the error is
object of class acdbrotateddimension can't be cast to oddbdimensionrecomputepe (probably appropriate protocol extension is not registered)
how can this be fixed?
the code snippet in question is
oddbblockreferenceptr pblock = pent;
oddbobjectid idowner = pent->ownerid();
if (!idowner.isnull()) {
// the exploded stuff will be appended to owner of entity being exploded
oddbblocktablerecordptr pbtr = oddbblocktablerecord::cast(idowner.openobject(oddb ::kforwrite));
if (!pbtr.isnull()) {
if(!pinsert->isunloaded() && !pinsert->isfromexternalreference())
pent->explodetoblock(pbtr);
}
}
just a guess, but have you linked to the recomputedimblock modules?
i had hooked in the recomputedimblock modules, following the instructions from an earlier thread. it still didn't work, but i didn't notice that the error message had changed to not being able to find recomputedimblock_2.04_8.drx. after adding that to the relevant directory, it is now working.
thanks very much.


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