How to get the composition of a Revit file size

How to get the composition of a Revit file size

SwainStrain
Enthusiast Enthusiast
754 Views
3 Replies
Message 1 of 4

How to get the composition of a Revit file size

SwainStrain
Enthusiast
Enthusiast

Hello everyone, 

 

I was asked if it's possible to collect data from a Revit file about the composition of its size.

For example, if a Revit file is 50mb, is it possible, using the Revit API, to get information that says:

"The file size is made up of

- 10mb families

- 20mb 3d elements/model

- 10mb views and annotations

- ...etc"

 

I searched through the Revit API documentation but I didn't find any resource talking about that.

 

Thank you very much in advance for your help!

Accepted solutions (1)
755 Views
3 Replies
Replies (3)
Message 2 of 4

RPTHOMAS108
Mentor
Mentor
Accepted solution

Interesting but I don't think that is possible.

 

For work shared files at least it is records in a database so when things are deleted they are often just marked as deleted but not really removed until the file is compacted. You see this from the fact that the size rarely reduces and when you compact it the file size can significantly reduce.

 

Perhaps for family files you may be able to get an idea based on the size outside of the project but there are a lot of shared items that are created at project level when a family is loaded in e.g. object styles, materials etc.

 

What would be the motivation?

Message 3 of 4

SwainStrain
Enthusiast
Enthusiast

Thank you @RPTHOMAS108 .

I think it would be useful to know how the file size is composed in order to clean Revit models more efficiently. But I understand it is not possible. Thanks.

0 Likes
Message 4 of 4

RPTHOMAS108
Mentor
Mentor

I think it is more about practicalities and how far you are willing to go. For example, it is 100% possible to extract families from a project i.e. saving them in a temp folder to measure their size as a metric of how much space they could be taking up in the project.

 

It may not be 100% accurate due to above comments but the inaccuracies would be shared by all family files so as an overall guide perhaps not so bad i.e. if expressed as a percentage: total size of all family files against size of each.

 

At the very minimum it would identify families that were outliers in terms of size. Although if your content comes from a library (as most Revit content does) then you have that data already without need of extraction. So then it is just about identifying which projects contain which families from the library.