IsReadOnly Property

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

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


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


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