IsReadOnly Property


Identifies if the document is read-only or can possibly be modified.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 21.0.0.0 (21.1.1.109)

Syntax

C#
public bool IsReadOnly { get; }
Visual Basic
Public ReadOnly Property IsReadOnly As Boolean
	Get
Visual C++
public:
property bool IsReadOnly {
	bool get ();
}

Remarks

Like the IsModifiable , IsReadOnly is also a dynamic property. It's value can change depending on the state a document is currently in. There are various factors that may affect this property. The most probable reason for this property to return 'true' is when Revit is currently processing failures (recoverable or not). Another possibility is when an external command is executed in read-only mode. If a document is in a read-only state, then not only the model cannot be modified at the moment, but even a new transaction may not be started. Attempting to do so will raise an InvalidOperationException.

See Also