Instantiates a transaction object
Namespace:
Autodesk.Revit.DB
Assembly:
RevitAPI
(in RevitAPI.dll) Version: 2015.0.0.0 (2015.0.0.0)
Syntax
C# |
---|
|
Visual Basic |
---|
|
Visual C++ |
---|
|
Parameters
- document
-
Type:
Autodesk.Revit.DB
Document
The document for which this transaction is going to be used.
- name
-
Type:
System
String
The name of the transaction. This name will appear in the undo menu once the transaction is successfully committed. The name must not be empty. The name can be reset later by either calling SetName(String) or by using the name argument in the Start(String) method.
Remarks
The transaction does not start by creating a transaction object.
One of the 'Start' methods will need to be called in order to start
this transaction.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions ArgumentException | The name argument is an empty string. -or- Document is a linked file. Transactions can only be used in primary documents (projects or families.) |
Autodesk.Revit.Exceptions ArgumentNullException | A non-optional argument was NULL |