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

yang686526 2009-05-05 09:24 AM

【转帖】endless loop when iterating diametric dimension block
 
endless loop when iterating diametric dimension block
endless loop when iterating diametric dimension block
it seems to me that an endless loop comes when i try to explode a block of a diametric dimension.
here is a sample code.
[code]
oddbblocktablerecordptr pblock = m_iddimblock.safeopenobject();
oddbobjectiteratorptr piter = pblock->newiterator();
for ( ; !piter->done(); piter->step() )
{
oddbentityptr pent = piter->entity();
try {
// some work with the current entity
} catch(oderror& err) {
// report some error
} //catch
} //for
</pre><hr></blockquote>
the problem occurs when an mtext entity becomes the current one.
the same problem seems to be in the old odt toolkit.
does smo knows a way for avoiding this?
thanks in advance
regards
chudomir
best regards
chudomir

hello,
i tested a sample code and have not found anything wrong. perhaps the trouble is caused by work with the current entity.
regards,
sergey vishnevetsky

hi, thanks for reply.
you're right - the problem was lying not in the iterators - it was exactly in my code, sorry for disturbance!
best regards
chudomir


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