Script Batch plot Problem

Discussion in 'AutoCAD' started by Mik, Feb 11, 2004.

  1. Mik

    Mik Guest

    I use a scripting program for batch plotting.
    The problem I'm having is when running the script it
    comes across an open drawing in the batch; the script
    doesn't know how to deal with this. The question WOULD YOU
    LIKE TO OPEN THE FILE READ-ONLY could be answered YES with
    the first line in the script and it would solve it but when
    it gets to an unopened drawing having YES as the first
    command stops it in its tracks.

    Here's the script file I'm using

    TileMode
    0
    -PLOT
    y

    Oce TDS400 Roll 1.pc3
    ISO A1 (841.00 x 594.00 MM)
    millimeters
    Landscape
    NO
    Extents
    FIT
    Center
    Yes
    A1.ctb
    Yes
    No
    No
    No
    No
    No
    Yes


    I don't know much about LISP but maybe a bit of code at
    the start could solve it.

    Thanks
    Mik
     
    Mik, Feb 11, 2004
    #1
  2. Mik

    R.K. McSwain Guest

    Assuming you are in MDI mode, the following bit of code should open the drawing regardless of whether it's currently open or not.

    (vlax-invoke-method (vlax-invoke-method (vlax-get (vlax-get-acad-object) "Documents") "Open" "X:\\MyPath\MyDrawing.dwg") "Activate")
     
    R.K. McSwain, Feb 12, 2004
    #2
  3. Mik

    Mik Guest

    Thanks for the quick reply.
    But it doesn't seem to work!
     
    Mik, Feb 12, 2004
    #3
  4. Mik

    R.K. McSwain Guest

    Works here.
    What version of AutoCAD?
     
    R.K. McSwain, Feb 13, 2004
    #4
  5. Mik

    Mik Guest

    ADT 3.3
    I think the problem is that the script running program concerns itself
    with opening the drawings, so by the time the code kicks in its
    already too late.
     
    Mik, Feb 13, 2004
    #5
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.