Loads the contents of this family document into another document.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.1.0.0 (26.1.0.34)
Syntax
C#
public Family LoadFamily( Document targetDocument, IFamilyLoadOptions familyLoadOptions )
Parameters
- targetDocument Document
- The target document which the family will be loaded into.
- familyLoadOptions IFamilyLoadOptions
- The interface implementation to use when responding to conflicts during the load operation.
Return Value
FamilyReference of the family in the target document.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | Thrown when the input argument-"targetDocument" or "familyLoadOptions"-is nullptr. |
InvalidOperationException | Thrown when the current document is not a family document, or when the target document is modifiable (e.g. there is an uncommitted transaction) or doesn't support load of this kind of families (e.g. loading a model family to detail family is disallowed), or the load was cancelled due to a conflict and a False return from one of the interface methods, or this document is currently in a read-only state. |
ForbiddenForDynamicUpdateException | Thrown if this method is called during dynamic update. |