Managing Families in Multiple Files

Managing Families in Multiple Files

mehdi.blanchard
Enthusiast Enthusiast
1,299 Views
6 Replies
Message 1 of 7

Managing Families in Multiple Files

mehdi.blanchard
Enthusiast
Enthusiast

 

Our large Revit projects are always split into multiple files. When a family is changed, it has to be saved in a specific folder.

 

Quite frequently the Project BIM Manager must reload all the project families in all the different files to make sure they are all the same.

 

I was wondering if a Revit Family has an internal GUID or version number that gets automatically updated by Revit after each Save, and if it is accessible with the API? (I am not going to ask the users to update a version number manually because if they forget the all process fails)

 

We could then compare the version/GUID numbers - between the project family folder and the family loaded in the files - and update as necessary.

 

Any help much appreciated!

 

0 Likes
Accepted solutions (1)
1,300 Views
6 Replies
Replies (6)
Message 2 of 7

Revitalizer
Advisor
Advisor

Hi,

 

BasicFileInfo class may fit your needs.

 

 

Revitalizer




Rudolf Honke
Software Developer
Mensch und Maschine





0 Likes
Message 3 of 7

Anonymous
Not applicable

I had a look at this class but although there is a property for the file version (as in the Revit version), it doesn't look like there is a "versioning" number as such. Or am I missing something?

0 Likes
Message 4 of 7

jeremytammik
Autodesk
Autodesk
Accepted solution

Dear Mehdi,

 

Thank you for your query.

 

I would suggest implementing your own GUID to identify the document in the manner you see fit, and complementing it with a version number as well.

 

You can store both of those in extensible storage, so that Revit will not touch the data:

 

http://thebuildingcoder.typepad.com/blog/about-the-author.html#5.23

 

I implemented a document GUID identifier for other purposes myself:

 

http://thebuildingcoder.typepad.com/blog/2016/04/named-guid-storage-for-project-identification.html

 

You can retrieve the information from the family definition and add it to the family instances, if you like:

 

http://thebuildingcoder.typepad.com/blog/2014/08/accessing-extensible-storage-on-ownerfamily-in-proj...

 

I hope this helps.

 

Best regards,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 5 of 7

Anonymous
Not applicable

Thanks Jeremy,

 

If I understand you correctly the process could be:

  1. Create an External Application that listens to Save events in the Family Editor.
  2. When the event is received, use Extensible Storage to add a GUID, a date, a username, etc... inside the Revit Family file

Then in one of the Revit project files:

  1. The user clicks on the Add-in called let say "Family Checker"
  2. The Family Checker reads all the rfa files located in the project folder and stores the data coming from their extensible storage
  3. The Family Checker compares the data between between the families loaded in the current project and the rfa's

The Checker could then either

  • Set an instance project parameter so that the floor plan could be filtered between up to date and out of date families
  • Pop a dialog showing out of date families and offer to reload them.

You'd just need to make sure that all the users have the External Application Addin installed...

0 Likes
Message 6 of 7

jeremytammik
Autodesk
Autodesk

Dear Mehdi,

Thank you for your update.

Yes, that approach sounds feasible.

 

One possibility tp address your last concern, making sure that users have an external application installed:

 

You could store a document macro in every document shared by your users that either:

 

  • Ensures the required application is indeed installed, or possibly
  • Implements all the functionality required in itself

 

I hope this helps.

Best regards,

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 7 of 7

mehdi.blanchard
Enthusiast
Enthusiast

Thanks Jeremy for your help.

0 Likes