open read only script

Discussion in 'AutoCAD' started by mantisguy, Sep 21, 2004.

  1. mantisguy

    mantisguy Guest

    I am trying to figure out hoe to open a series of drawings read only using a script file, but cannot figure out what forces Autocad to open read only. I'm trying to extract border attributes and would like to do so while others have the drawing open. I then can close the file with no save....figured that one out after some interesting work with script responses to the close command. just follow clos with "yes" instead of the logical "no" response.
     
    mantisguy, Sep 21, 2004
    #1
  2. mantisguy

    Owen Wengerd Guest

    I am trying to figure out hoe to open a series of drawings read only using
    only.

    Make sure the file is already open before AutoCAD opens it:
    (open "X:\\MyPath\\MyDrawing.dwg" "a")
    OPEN X:\MyPath\MyDrawing.dwg _Yes
     
    Owen Wengerd, Sep 21, 2004
    #2
  3. ;;; opens and activates a file as Read-Only
    (defun openRO (fna)
    (vla-activate (vla-open (vla-get-documents (vlax-get-acad-object)) fna
    :VLAX-TRUE))
    )


    --
    Best Regards, Jimmy Bergmark
    CAD and Database Developer Manager at www.pharmadule-emtunga.com
    Take a look at
    JTB FlexReport (FLEXlm report tool) - www.jtbworld.com/jtbflexreport
    SmartPurger (Purges automatically) - www.jtbworld.com/?/smartpurger.htm
    or download some freeware at www.jtbworld.com
    More on AutoCAD 2005;
    www.jtbworld.com/autocad2005.htm
     
    Jimmy Bergmark, Sep 22, 2004
    #3
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.