ReadOnly Property (ActiveX)

Specifies if the document or property is read-only or read-write.

Supported platforms: Windows only

Signature

VBA:

object.ReadOnly
object

Type: Document, DynamicBlockReferenceProperty

The objects this property applies to.

Property Value

Read-only: Yes

Type: Boolean

Remarks

No additional remarks.

Examples

VBA:

Sub Example_ReadOnly()
    ' This example shows if current drawing file is read only or not
    
    If ThisDrawing.ReadOnly Then
        MsgBox "The current drawing file is read only.", , "ReadOnly Example"
    Else
        MsgBox "The current drawing file is read-write.", , "ReadOnly Example"
    End If
    
End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_ReadOnly()
    ;; This example shows if current drawing file is read only or not
    (setq acadObj (vlax-get-acad-object))
    (setq doc (vla-get-ActiveDocument acadObj))
    
    (if (= (vla-get-ReadOnly doc) :vlax-true)
        (alert "The current drawing file is read only.")
        (alert "The current drawing file is read-write.")
    )
)