CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor and other Autodesk products []
Cesky English Deutsch
 Visitors: 4108 

CAD tip CAD tip # 10658:

Question CAD 
 %  platform  category 
Q - question

How to open a R/O DWG without the read-only warning?

A - answer AutoCAD issues a standard "read-only warning" dialog when you attempt to open a DWG drawing which is read-only because of its R/O file attribute, a R/O disk drive (e.g. a CD), or because of limited access rights.

To avoid this warning which has to be clicked to close, use an alternative Open method. Or use it when you just want to open a standard DWG file in read/only mode. Instead of the standard Windows Explorer open, start your DWG file using the following batch file "OpenRO".

Store the following code to OpenRO.BAT or OpenRO.CMD in your Windows search path:

rem Open DWG file as R/O - -
set fnro=%1
set fnro=%fnro:\=/%
echo (vl-load-com)(defun openRO(fn)(vla-activate(vla-open(vla-get-documents(vlax-get-acad-object)) fn :VLAX-TRUE))) > "%TEMP%\openRO.scr"
echo (openRO "%fnro%") >> "%TEMP%\openRO.scr"
rem Modify your AutoCAD path:
"C:\Program Files\Autodesk\AutoCAD 2016\acad.exe" /b "%TEMP%\openRO"

Or download it here - including the dynamic version "Open2" which automatically decides if the DWG file is R/O and calls either standard Open or OpenRO.

You can also reassociate your DWG files' Open method in Windows Explorer to use this command batch automatically for all DWG files, or add it as a new item to the DWG file context menu through the Registry.

Start Regedit, browse to the key HKEY_CLASSES_ROOT\AutoCAD.Drawing (any, e.g. Drawing.20), right click on "shell" and add a new key named e.g. "Open R/O". Add a new key under it, named "command". Double-click on its "Default" key and type the full path to your OpenRO.bat file, plus the parameter "%1" - e.g.:

C:\UT\OpenRO.bat %1

Now you can open your DWGs in R/O mode through the context menu in Explorer:

100% *  CAD 
18.12.2015    2582x   FAQ  
Comments   Tell a friend
applies to: AutoCAD ·

See also:
Tip 8532:Import of 3D DWF files back to editable 3D models.
Tip 7925:DWGsync - synchronized co-viewing of multiple DWGs.
Tip 5666:How to suppress the Read-Only warning on DWG file open?
Tip 2229:How to convert .DWF files back to the DWG format?
Tip 2063:How to open a drawing with write-protection (R/O)?

Back   All CAD Tips All CAD tips&tricks

Automatic warning on DWG open. « | » How to store macros inside DWG drawings?

Have we helped you? If you want to support the CAD Forum web service, consider buying one of our CAD applications, or our custom software development offerings, or donating via PayPal (see above). You may also add a link to your web - like this "fan" link: CAD Forum - tips, utilities, blocks for Autodesk products
CAD:    OS:    Categ: 
Text:  FAQ glossary   

Use Google Earth images in your AutoCAD projects with the Plex.Earth Tools More info

Please use these tips at your own risk.
CAD Studio (Xanadu) is not responsible for possible problems that may occur as a result of using any of these tips.