Transaction.SetName Method

TransactionSetName Method

Sets the transaction's name.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.0.4.0 (26.0.4.0)
Syntax
public void SetName(
	string name
)
Public Sub SetName ( 
	name As String
)
public:
void SetName(
	String^ name
)
member SetName : 
        name : string -> unit 

Parameters

name  String
A name for the transaction.
Exceptions
ExceptionCondition
ArgumentException The name argument is an empty string.
ArgumentNullException A non-optional argument was null
Remarks
A transaction needs a name before it can be started, i.e. before one of the 'Start' method is invoked for this transaction object. The name will later appear in the Undo menu in Revit after a transaction is successfully committed.

Another ways of setting the name is either during construction or during the Start(String) method.

See Also