Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18

Thread: Open Drawing read-only from Explorer

  1. #11
    Certified AUGI Addict rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Houston
    Posts
    7,519

    Default Re: Open Drawing read-only from Explorer

    Quote Originally Posted by RobertB View Post
    R.K. I think this is a great tip too. However, I've seen the need to delay the resetting of the attribute.
    Good tip. Mine worked without it, but I can certainly see why it might be needed.

  2. #12
    All AUGI, all the time
    Join Date
    2003-10
    Posts
    688

    Default Re: Open Drawing read-only from Explorer

    How would you do this in Windows 7? Apparently, windows explorer in Win7 doesn't give you any "apparent" options to do anything with anything. Maybe I just need a Windows 7 for dummys book or something.

  3. #13
    Administrator RobertB's Avatar
    Join Date
    2001-08
    Location
    Dallas TX USA
    Posts
    5,825

    Default Re: Open Drawing read-only from Explorer

    Quote Originally Posted by Coolmo View Post
    How would you do this in Windows 7? Apparently, windows explorer in Win7 doesn't give you any "apparent" options to do anything with anything. Maybe I just need a Windows 7 for dummys book or something.
    No, I think the friendly interface has disappeared. However, you can add it by the registry.

    The below sample is for AutoCAD 2010. Change the "18" to "17" for AutoCAD 2007-2009. Change the text in green to match your file location and name.

    Code:
    Windows Registry Editor Version 5.00
    
    [HKEY_CLASSES_ROOT\AutoCAD.Drawing.18\shell\Open_as_Read_Only]
    @="Open as Read Only"
    
    [HKEY_CLASSES_ROOT\AutoCAD.Drawing.18\shell\Open_as_Read_Only\command]
    @="\"C:\\Acad\\Cache\\Open DWG as Read Only.cmd\" \"%1\""
    R. Robert Bell
    Design Technology Manager
    S P A R L I N G
    Opinions expressed are mine alone and do not reflect the views of Sparling.

  4. #14
    AUGI Addict
    Join Date
    2006-04
    Location
    (0,0,+|Z|)
    Posts
    1,119

    Default Re: Open Drawing read-only from Explorer

    Quote Originally Posted by RobertB View Post
    No, I think the friendly interface has disappeared. However, you can add it by the registry.

    The below sample is for AutoCAD 2010. Change the "18" to "17" for AutoCAD 2007-2009. Change the text in green to match your file location and name.

    Code:
    Windows Registry Editor Version 5.00
     
    [HKEY_CLASSES_ROOT\AutoCAD.Drawing.18\shell\Open_as_Read_Only]
    @="Open as Read Only"
     
    [HKEY_CLASSES_ROOT\AutoCAD.Drawing.18\shell\Open_as_Read_Only\command]
    @="\"C:\\Acad\\Cache\\Open DWG as Read Only.cmd\" \"%1\""
    So this will work with v2011 by replacing 18 with 19?
    And will it work in Win7 platform?

  5. #15
    Administrator RobertB's Avatar
    Join Date
    2001-08
    Location
    Dallas TX USA
    Posts
    5,825

    Default Re: Open Drawing read-only from Explorer

    Quote Originally Posted by BoKirra View Post
    So this will work with v2011 by replacing 18 with 19?
    And will it work in Win7 platform?
    No, there is no change for 2011 since it has the same file format.

    Yes, it works with Win7 (that's what I use.)
    R. Robert Bell
    Design Technology Manager
    S P A R L I N G
    Opinions expressed are mine alone and do not reflect the views of Sparling.

  6. #16
    Member
    Join Date
    2010-05
    Location
    Saudi Arabia
    Posts
    20

    Thumbs down Re: Open Drawing read-only from Explorer

    v good dear nice sharing keep it up.
    JAMAL

  7. #17
    Woo! Hoo! my 1st post
    Join Date
    2008-09
    Posts
    1

    Default Re: Open Drawing read-only from Explorer

    Great tip, but the only reason i wanted to open a DWG in read only is when the file isnt mine to edit, i just wish to review it. If the file is currently opened by another user, this batch file doesnt work - i get a cmd message saying "The process cannot access this file because it is being used by another process"

    Obviously i can use Autocad's open read only way, but i was hoping this could be done by explorer.

    Any help/suggestions?

    edit- Im using winXP SP3 and the files are located on a server.

  8. #18
    All AUGI, all the time arshiel88's Avatar
    Join Date
    2005-02
    Location
    Off the Grid
    Posts
    548

    Default Re: Open Drawing read-only from Explorer

    In that case...

    Code:
    On Error Resume Next
    dim cmd_arg
    set cmd_arg=wscript.Arguments
    
    Dim acadApp
        Set acadApp = GetObject(, "AutoCAD.Application")
    	
        If Err Then
            Err.Clear
            Set acadApp = CreateObject("AutoCAD.Application")
        End if
    
    acadApp.visible=True
    acadApp.WindowState = 3
    acadApp.Documents.Open cmd_arg(0), True
    Save this to OpenReadOnly.vbs anywhere, say drive C.

    Then the command under Application used to perform action: would be
    wscript.exe C:\OpenReadOnly.vbs "%1"

    Tested on local files in AutoCAD 2008 XP SP3 Platform. Please try if it will work on other versions and network files.

    Shielbern Bolalin
    Architectural 3D Renderer
    ----------------------------------------------------------------------
    “A clever person solves a problem. A wise person avoids it.”

    1879-1955

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Open drawing read-only via command line
    By JasonSelf in forum AutoLISP
    Replies: 34
    Last Post: 2009-01-12, 04:55 AM
  2. Open read only turns into actual live drawing
    By Steve_Bennett in forum AutoCAD General
    Replies: 18
    Last Post: 2007-04-24, 08:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •