高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】problem with rotateddimension
problem with rotateddimension
problem with rotateddimension
i'm trying to export dimensions and i'm having a problem with rotated dimensions.
i've simplified the problem down to the following: if "type" is linearaligned, the code works, however if not (the else clause), the program crashes on the closing brace ("}") - i assume in one of the destructors...
surely i'm doing something obvious wrong - please tell me what it is.
if (type == linearaligned)
{
oddbaligneddimensionptr paligneddimension = oddbaligneddimension::createobject ();
// open the block to which new entities will be added.
oddbblocktablerecordptr pblock = blockid.safeopenobject (oddb::kforwrite);
pblock->appendoddbentity (paligneddimension);
}
else
{
oddbrotateddimensionptr protateddimension = oddbrotateddimension::createobject ();
// open the block to which new entities will be added.
oddbblocktablerecordptr pblock = blockid.safeopenobject (oddb::kforwrite);
pblock->appendoddbentity (protateddimension);
}
smart pointer destructor activated dimension "close" operation. at this moment dimension block is created. this operation crashes because you have not set dimension points specifying extension and dimension lines - they all are (0,0,0).
sergey slezkin
|