This was a request on Twitter, I’ve had a play and I can’t get it to work with @erfajo and @john_pierson 's awesome nodes and there doesn’t seem to be any access to the family category from a document in the Revit API…? Forgive my Python failings!
If the families are named properly (via Dynamo) and you have millions of them, John’s would probably be the fastest, so definitely a good solution…
But I would be very interested to know your method! I expect the code will be locked away in a zero touch node, but would you mind showing us how you do it when you post the node?
Have fun at the DUG, Copenhagen is such a wonderful city!
Glad it worked out! Apologies if I wasn’t clear what it was doing in the first place. The graph was reading the full text data of the RFA and getting the category name within than text. I might have made it incorrectly seem like it was relying on filename.
Thanks for sharing! This was super helpful for my team and I. I made a modification to include subfolders. In other words, this version of the graph will “obtain the family files from the directory [and its sub-directories] without opening them”. I hope this helps:
I was trying to take some pieces of this and apply it to a Graph i was making that would check all Project Families for any imported DWGs. I was able to get the graph to function, but the Output names of the families could sometimes be confusing as to what family type a particular family was (better family naming conventions might help… but that’s beside the point).
So - i wanted to use the “read text” trick to get the family categories for the problematic families, and include it in the output.
The problem I am having is twofold… Originally, i was getting error messages that the .rfa files couldn’t be read by the File.ReadText node, becasue the files were all being used by some other thing at the time.
I added passthroughs to try to get the two part sof the graph to work in sequence, but then i started getting warnings that “Cyclic Dependencies Exist Between Two Variables”
I am not sure if that is now why the .rfa files aren’t being read - or if the issue is still that the files are “busy”