& Construction

Integrated BIM tools, including Revit, AutoCAD, and Civil 3D
& Manufacturing

Professional CAD/CAM tools built on Inventor and AutoCAD
Integrated BIM tools, including Revit, AutoCAD, and Civil 3D
Professional CAD/CAM tools built on Inventor and AutoCAD
I am working on adding a progress bar to my implementation of custom exporter. The idea is to progress the bar after processing every element. To make that work properly, I need to know how many elements I should expect.
I know there are several ways to get the elements that represent 3D geometry in a document, but none of them appear to give me the correct number.
Is there a way to know how many elements I should expect when I export a model with custom exporter? If not, what's the best approximation ?
The custom exporter works with a specific 3D view. Actually, nowadays, it can even be a 2D view.
You could simply run a filtered element collector with that view element id argument to retrieve the total number of elements visible in that view. Maybe you can specify additional filter criteria to limit the number to the truly visible elements with geometry that does indeed get routed to the custom exporter.
After running the custom exporter, you can always compare the predicted number and the true count of processed elements to see how far off the estimate was.
Please let us know what you find out.
Thank you!
Best regards,
Jeremy
How to buy
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © 2025 Autodesk Inc. All rights reserved
Type a product name