Read-only mode

Discussion in 'AutoCAD' started by ESLim3, May 17, 2004.

  1. ESLim3

    ESLim3 Guest

    Can anyone tell me how to open a drawing in "Read-only" mode using a script file? I created a batch routine that opens up a list of drawings one at a time but the script stops whenever the drawing is opened by another user.
     
    ESLim3, May 17, 2004
    #1
  2. ESLim3

    ECCAD Guest

    (command "open" "y" "c:/d-demofiles/panel1" "y")

    1st Y is to answer question ' save changes' (in current .dwg), 2nd Y is to answer question 'Open read-only'.

    Also, you could use McNeel DOS_Lib function..
    (if (= (cdr (dos_attrib "filespec")) 1)(command ".open" "filespec" "Y")(command ".open" "filespec")
    )

    Bob
     
    ECCAD, May 17, 2004
    #2
  3. ESLim3

    ESLim3 Guest

    I'm looking more in the line of a script format rather than autolisp. Also I would like to open up the file in read-only mode regardless of whether there is someone currently in a drawing or not.

    I've tested the routine you included using DOSLib 5. (dos_attrib "filespec") yields 104 and not 1 and I tested this on an open drawing and one that is not. They yield the same results.
     
    ESLim3, May 17, 2004
    #3
  4. ESLim3

    Matt W Guest

    copy all of the files to a local drive, open them, do whatcha gotta do,
    start a new drawing, delete the copied files.
    That's probably what I would do in lieu of writing a VBA program.

    --
    Matt W

    There are 3 kinds of people:
    Those who can count, and those who can't.

    I would like to open up the file in read-only mode regardless of whether
    there is someone currently in a drawing or not.
    "filespec") yields 104 and not 1 and I tested this on an open drawing and
    one that is not. They yield the same results.
     
    Matt W, May 17, 2004
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.