Has anyone come across a quick way to count the Symbol Table entries .. other than iterating and += .. I feel like I'm missing something thats probably obvious ..
Given that there's no way to do it in native ARX
without iteration, I would guess not.
Interesting side note is that many VBA/ActiveX programmers
do not have the slightest idea how horribly ineffecient code
like this is:
AcadApplication Acad = ///
AcadBlocks blocks = Acad.ActiveDocument.Blocks;
for(int i = 0; i < blocks.Count; i++ )
DoSomethingWith( blocks.Item[i] );
The Count property of all ActiveX symbol table wrappers
must also do exactly what you'd like to avoid
, and the
Item[] indexer must also do the same thing (to find the
element at a given index position).