DocumentIsReadOnly Property |
Identifies if the document is read-only or can possibly be modified.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic bool IsReadOnly { get; }
Public ReadOnly Property IsReadOnly As Boolean
Get
public:
property bool IsReadOnly {
bool get ();
}
member IsReadOnly : bool with get
Property Value
Boolean
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