CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz]
CZ | EN | DE
Login or
registration
  Visitors: 21237

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 - www.cadstudio.cz - www.cadforum.cz
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:

ACAD
100% *  CAD 
18.12.2015    19323×   FAQ  
Prices - CAD eShop:
applies to: AutoCAD ·

See also:


Back   All CAD Tips



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   



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


Please use these tips at your own risk.
Arkance Systems is not responsible for possible problems that may occur as a result of using any of these tips.
TOPlist