As usual, the Revit .NET API 2013 has provided some more functionalities and changed some existing stuffs too.
In this post, let’s have a look at the IFamilyLoadOptions Interface. The ‘ref’ arguments of its only two methods have been changed to ‘out’. The old interface methods look like this:
bool OnFamilyFound(bool familyInUse, ref bool overwriteParameterValues)
bool OnSharedFamilyFound(Family sharedFamily, bool familyInUse, ref FamilySource source, ref bool overwriteParameterValues)
and the new interface methods look like this:
bool OnFamilyFound(bool familyInUse, out bool overwriteParameterValues)
bool OnSharedFamilyFound(Family sharedFamily, bool familyInUse, out FamilySource source, out bool overwriteParameterValues)
Not sure why these changes were bothered to be made, but from my humble point of view, it is not a big deal at all. The only difference might be that Revit internally does not need to initialize some Boolean variables. However, for Revit addin programs, these IFamilyLoadOptions Interface implementations have to be all re-factored. That may what migration means!
In terms of our Family Optional Loader item wizard, please don’t worry. It will be updated accordingly in the Revit API 2013 support.
Revit Addin Wizard (RevitAddinWizard) provides various wizards, coders and widgets to help program Revit addins. It can be downloaded from the Download link at the bottom of the blog index page.
Posted by: |