Open read only Lisp

Open read only Lisp

Code_x
Advocate Advocate
651 Views
9 Replies
Message 1 of 10

Open read only Lisp

Code_x
Advocate
Advocate

Hi, I'm using AutoCAD 2024 and juggling a lot of files at once due to coordination tasks. When I need to restart my computer, I have to close CAD and manually save the file paths of at least 8 files. I'm looking for a LISP or some tool that allows me to open multiple links in read-only mode. Is there a method to do this apart from pasting the link in the open file dialog and navigating to read-only? I’m seeking a more efficient way, as I’ve been doing it this way for quite some time. Since the files I work with change daily, I don't want to pin them in AutoCAD’s start-up page. I mainly save the path in my notes and re-opening them when needed. Notes that contain file paths constantly gets updated. 

0 Likes
652 Views
9 Replies
Replies (9)
Message 3 of 10

Code_x
Advocate
Advocate
It doesn't work. I created a .lsp file, and it loaded in CAD, but when I tried to trigger it to open a file, it opened normally. Can you please provide steps if you happen to know them? Not sure if I am doing something wrong

0 Likes
Message 4 of 10

Moshe-A
Mentor
Mentor

@Code_x  hi,

 

when i open a file in read only i end up closing it without saving, why do want to save?

if you do want to save, why open them in read only?

 

Moshe

 

 

0 Likes
Message 5 of 10

komondormrex
Mentor
Mentor

hi,

 

(foreach file '("full_filename_1.dwg" "full_filename_2.dwg" "full_filename_3.dwg" "full_filename_4.dwg" "full_filename_5.dwg" "full_filename_6.dwg")
	(vla-open (vla-get-documents (vlax-get-acad-object)) file :vlax-true)
)

 

where "full_filename_1...6.dwg"  have to be something like this 

"drive:\\full_path\\name_1...6.dwg" or "drive:/full_path/name_1...6.dwg"

0 Likes
Message 6 of 10

Code_x
Advocate
Advocate
Can you please provide steps how to use this?
0 Likes
Message 7 of 10

Code_x
Advocate
Advocate

Is there a way to adjust AutoCAD settings to open files in read-only mode, as an alternative to using Lisp? 

0 Likes
Message 8 of 10

DGCSCAD
Collaborator
Collaborator

You can set your DWG files (or most any other file) to Read-Only in Windows Explorer by right clicking on the file, select Properties, then check the Read-Only box.

AutoCad 2018 (full)
Win 11 Pro
0 Likes
Message 9 of 10

pendean
Community Legend
Community Legend

@Code_x wrote:

Is there a way to adjust AutoCAD settings to open files in read-only mode, as an alternative to using Lisp? 


No.

 

Would using a software like DWGTRUEVIEW instead of AutoCAD not an option? it only opens DWG files as read-only since it has no ability to write to the DWG file.

0 Likes
Message 10 of 10

pendean
Community Legend
Community Legend

@Code_x wrote:
It doesn't work. I created a .lsp file, and it loaded in CAD...


If you are trying the VBA based tips, you need to install this first (restart your PC afterwards) to enable VBA in AutoCAD (it's never installed unless you do so)

https://www.autodesk.com/support/technical/article/caas/tsarticles/ts/3kxk0RyvfWTfSfAIrcmsLQ.html 

0 Likes