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

yang686526 2009-05-06 04:28 PM

【转帖】iterator or blocktablerecord entity coun
 
iterator or blocktablerecord entity count?
iterator or blocktablerecord entity count?
this is a pretty inane question. i'm just looking for a ->count() method for the iterator of a block, or perhaps of the block itself. currently i'm stuck looping twice, once for the counter, the other time for the actual code. i need the count for a progress bar, not for the actual loop.
help isn't of much use, except for the "reference count", but this doesn't tell me much. please help me out!
thanks in advance.

function returning number of entities in block is available only in activex (actualy it iterates the block entities to get their count).
btw for progress meter oddbdatabase::approxnumobjects() function may be usefull.
sergey slezkin

thanks for the info. leave it to sergey! guess i'll just loop twice, since i don't need to know the number of objects in the db, i need particular counts such as attribs, entities, etc. but thanks for the suggestion.
anyway could you possibly tell me a bit more on what exactly this referencecount() is all about.


所有的时间均为北京时间。 现在的时间是 07:48 AM.