Revit 2015 API |
Document..::..LoadFamily Method (String, IFamilyLoadOptions, Family%) |
Document Class See Also |
Loads an entire family and all its types/symbols into the document and provides a reference
to the loaded family.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 2015.0.0.0 (2015.0.0.0)
Since: 2011
Syntax
C# |
---|
public bool LoadFamily( string filename, IFamilyLoadOptions familyLoadOptions, out Family family ) |
Visual Basic |
---|
Public Function LoadFamily ( _ filename As String, _ familyLoadOptions As IFamilyLoadOptions, _ <OutAttribute> ByRef family As Family _ ) As Boolean |
Visual C++ |
---|
public: bool LoadFamily( String^ filename, IFamilyLoadOptions^ familyLoadOptions, [OutAttribute] Family^% family ) |
Parameters
- filename
- Type: System..::..String
The fully qualified filename of the Family file, usually ending in .rfa.
- familyLoadOptions
- Type: Autodesk.Revit.DB..::..IFamilyLoadOptions
The interface implementation to use when loading a family into the document.
- family
- Type: Autodesk.Revit.DB..::..Family%
A reference to the family that was loaded if successful, otherwise Nothing.
Return Value
True if the entire family was loaded successfully into the project, otherwise False.
Remarks
Loading an entire family may take a considerable amount of time and memory. It is
recommended that you use LoadFamilySymbol and only load those symbols that you need. The path to
the installed Autodesk Revit family files can be found by using the Application.Options object
and its methods.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions..::..ArgumentException | Thrown when filename is nullNothingnullptra null reference (Nothing in Visual Basic) or empty. |
Autodesk.Revit.Exceptions..::..ArgumentNullException | Thrown when the input argument "familyLoadOptions" is nullNothingnullptra null reference (Nothing in Visual Basic). |