高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】vectorization Error For Entity Oddbsequenceen
vectorization error for entity: oddbsequenceend
vectorization error for entity: oddbsequenceend
hi,
i am using the following code to vectorize entities:
odprintconsolestring(l"%s\n", pent->isa()->name().c_str());
if (pent.isnull()) return -1;
if (pent->iskindof(oddbsequenceend::desc())) return -1;
odstaticrxobject<myrenderer> dv;
odstaticrxobject<odgicontextfordbdatabase> gicontext;
gicontext.setdatabase(pent->database());
dv.setdrawcontext(&dv);
dv.setcontext(&gicontext);
dv.output().setdestgeometry(dv);
dv.draw(pent);
when the entity is a acdbsequenceend the vectorization gives assertion fault in dbentity.cpp line 1773. therefore i added the check:
if (pent->iskindof(oddbsequenceend::desc())) return -1;
to overcome this problem. i realize the documentation states: "these entities have no associated geometries" but should it give this error?
this is an assert, not an error. it is there to warn anyone who might inadvertently call worlddraw of a non-graphical entity.
vladimir
thanks for the info. what is the best way to check if the entity graphical or non-graphical?
i don't know.
non graphical entity is an exception, and generally you should not want to vectorize one. (where did you get it at all?)
if the entity is database resident, you may check if it's owner is block table record, because an entity should reside in a block. the exceptions are acdbblockbegin and acdbblockend
vladimir
|