Commit Method


Finishes the edit scope.

Namespace: Autodesk.Revit.DB.Visual
Assembly: RevitAPI (in RevitAPI.dll) Version: 18.0.0.0 (18.2.0.0)
Since: 2018.1

Syntax

C#
public void Commit(
	bool updateOpenViews
)
Visual Basic
Public Sub Commit ( _
	updateOpenViews As Boolean _
)
Visual C++
public:
void Commit(
	bool updateOpenViews
)

Parameters

updateOpenViews
Type: System Boolean
When true, force update of the open views.

Remarks

All the changes made after starting the EditScope will be committed. Changes will be merged into one transaction. If the appearance asset element is used in one or more materials, they will be updated to match any changes made. Open views may not redraw after changes. View update can be forced with the input argument, but doing so can be an expensive operation. Consider using false if immediate update is not needed or if multiple calls to this method are used in a loop.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions InvalidOperationException EditScope is not active. EditScope can only be committed or cancelled when it is active. -or- EditScope cannot be closed, there is no opened transaction. -or- The editable asset is not valid.

See Also