Transaction(Document) Constructor

Transaction(Document) Constructor

Instantiates a transaction object.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.3.0.0 (25.3.0.0)
Syntax
public Transaction(
	Document document
)
Public Sub New ( 
	document As Document
)
public:
Transaction(
	Document^ document
)
new : 
        document : Document -> Transaction

Parameters

document  Document
The document for which this transaction is going to be used.
Exceptions
ExceptionCondition
ArgumentException Document is a linked file. Transactions can only be used in primary documents (projects or families.)
ArgumentNullException A non-optional argument was null
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.

A transaction cannot start unless is has a valid (non-empty) name. Because this constructor does not take a name, a name must be assigned later before or during the 'Start' method.

See Also