Autolisp for only read

Autolisp for only read

antonio_oliveiraG63JM
Advocate Advocate
472 Views
1 Reply
Message 1 of 2

Autolisp for only read

antonio_oliveiraG63JM
Advocate
Advocate

I would like to create a ".lsp" file to use in the "startup" function of Plant 3D's APPLOAD so that every dwg opened is automatically opened as read-only, could you help me? I don't know how to proceed.

0 Likes
Accepted solutions (1)
473 Views
1 Reply
Reply (1)
Message 2 of 2

LDShaw
Collaborator
Collaborator
Accepted solution

This may help

(defun openReadOnly (/ fo)
  (if (setq fo (getfiled "Open Drawing" "" "dwg" 8)) ;
    (command "vbastmt"
             (strcat
               "AcadApplication.Documents.Open"
               (chr 34)fo(chr 34)", true"
               )
             )
    )
  (princ)
  )

Found at 
https://www.theswamp.org/index.php?topic=1876.0