Family size

Pyrevit has a family size button… However it seems to be broken for all of our company machines today…

Yes I know a big family can work better than a small family …

BUT - Is it possible to grab the filesize of a Revit family without exporting the Revit families (basically like pyrevit does it)

I tried .Length but AttributeError: ‘Family’ object has no attribute ‘Length’

I’d look into how PyRevit does this directly - the code is open source. There are a few ways, but as far as I know they all rely on putting the document on the disc somewhere (a requirement due to the compression inherent to all Revit file types - they are a form of structured storage after all).

My guess would be opening the family document, saving to a temp file, getting the size of the temp file, and moving onto the next (overwriting the file each time) before eventually deleting the temp file.

1 Like

I know you can open pyrevit… but I’ve never done it and was hoping someone may already know the answer :rofl:

Suppose I’ll have to export :frowning:

Thanks tho.

Who has to open? It’s on GitHub, likely here: https://github.com/eirannejad/pyRevit/blob/6aa2c493231f4301125f2570dc5efd644691bbad/extensions/pyRevitTools.extension/pyRevit.tab/Analysis.panel/Tools.stack/Inspect.pulldown/ListFamilySizeCreator.pushbutton/ListFamilySizeCreator_script.py#L4

In particular see line 100 and on.

2 Likes

Ah! You rule! :smiley:

And you were right - they are exporting to a temp folder!

Awesome! Thank you :slight_smile:

1 Like