EditFamily Method


Document Edit Family Method

Gets the document of a loaded family to edit.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.3.0.0 (25.3.0.0)
Syntax
public Document EditFamily(
	Family loadedFamily
)

Parameters

loadedFamily Family
The loaded family in current document.

Return Value

Document
Reference of the document of the family.
Exceptions
Exception Condition
ArgumentNullException Thrown when the input argument-"loadedFamily"-is .
ArgumentException Thrown when the input argument-"loadedFamily"-is an in-place family or a non-editable family. (This can be checked with the IsInPlace and IsEditable properties of the Family class.
InvalidOperationException Thrown when the family is already being edited.
ForbiddenForDynamicUpdateException Thrown if this method is called during dynamic update.
InvalidOperationException Thrown if this method is called while the document is modifiable (i.e. it has an unfinished transaction.)
InvalidOperationException Thrown if this method is currently in a read-only state.
Remarks
This creates an independent copy of the family for editing. To apply the changes back to the family stored in the document, use the LoadFamily overload accepting IFamilyLoadOptions .

This method may not be called if the document is currently modifiable (has an open transaction) or is in a read-only state. The method may not be called during dynamic updates. To test the document's current status, check the values of IsModifiable and IsReadOnly properties.

See Also