Batch Auditing Families

Hello all,

Recently, I’ve had a Revit model which has families which have become “corrupt” and need to be audited and reloaded into the Revit project. Only problem is that there are over 200 families that are corrupt and doing this would take a long time. I have a list of the corrupted families which can be brought into Excel, Word, or .txt document.

Is there a way to automate opening the families and auditing them?
Then those families could be saved in a folder, then batch reloaded back into the model.

This is sort of a complicated task, and I’m not sure if it’s possible or not but I thought I’d ask for some input. Any help is appreciated. :slight_smile:
Thank you in advance!

Hey @erfajo,

That looks a lot like what I’m trying to do! I’m very new to Python so I kind of just needed a place to start and that looks like it! I’ll have to implement the auditing somehow. I’ve found this but I’m not quite sure how to implement it: http://www.revitapidocs.com/2016/61fd9502-777d-a946-aead-24974c8ac3f2.htm

I have found that I can pull the corrupt families from an older model and save them into a new folder manually (which isn’t so bad).
I guess loading them in with a script like this is the way to go. Is it possible to add the auditing property? Would that be in this part of the Python code?

#Ensure loaded families can overwrite existing families.
class FamilyOption(IFamilyLoadOptions) :
	def OnFamilyFound(self, familyInUse, overwriteParameterValues) :
		overwriteParameterValues = True
		return True

	def OnSharedFamilyFound(self, sharedFamily, familyInUse, source, overwriteParameterValues) :
		return True

Thanks! :smiley:

Looks great! Thank you so much! :smiley:

Hello all,
I would like to bring the matter a bit further.

I’m trying to Batch Audit Revit project file (.RVT) in a specific directory.
I would like to create a script that I can run once a week before leaving the office and coming back the next day with all the project saved after been audited.

I’m talking about opening the project file being sure that the Audit check-box is ticked, let the Audit to do the work, save and close the file. I would like to automate all this process.

I found this site and it comes close to my needs, it uses the Rhythm package.
But the question is that I’m not sure that this script is “clicking the Audit checkbox” when opening a project file.

I hope someone to help me; I just started with Dynamo :smiley:

Hi Alessandro,

I haven’t been able to find anyone who has done a model audit, I was more focused on auditing families in this ticket.
The link that you sent is about auditing families. Are you looking to audit families (or .RFA) files or Revit models (.RVT models)?

Hi @quagliatol

Thank you for your reply.

I’m interested in auditing Revit models (.RVT).
I know the link I sent is about auditing families, but it can also be seen as a script for opening, upgrading and closing Revit files.
But I’m not interested in upgrading version of Revit files without first Audit the RVT model.