I wish to iterate through many components in my library & get the model statistics, the same as you get when you go via the UI of Model Info > Statistics.
I’m doing this so that I can find any poorly made components (I know there are a few hidden away!) that have far too many edges or such.
All the file loading & iterating is all sorted, but I can’t find the statistics to have an equivalent within the API!
I did not show all entity types, but you should get the general idea.
ADD: I also did not deal with unused definitions (ie, ones whose used_instances == 0.) In those cases, the number of entity objects in their entities collection would not be multiplied by the number of instances, so the count would be just those that occur in the entities collection. These definitions do take up space in the model file, but not as much as those having many instances actually in the model geometry.