vla-close and vla-open

Discussion in 'AutoCAD' started by Odie Silva, Apr 6, 2004.

  1. Odie Silva

    Odie Silva Guest

    Hi all,

    I have almost 300 drawings that I need to open, do few things there, closing
    with saving.

    I run a single document variable mode.

    I tried (vla-close myDoc :vlax-true) but it says my drawing is busy...

    if someone could save me same time on this it will be greatly appreciated.

    Odie
     
    Odie Silva, Apr 6, 2004
    #1
  2. Odie Silva

    Odie Silva Guest

    I am trying this:

    say, i have currently sht238 open and my next drawing is "sht239"

    (vla-open (strcat (getvar "DWGPREFIX") "sht239.dwg"))

    it gives me "Automation error. Method not available in SDI mode
     
    Odie Silva, Apr 6, 2004
    #2
  3. This kind of thing is fairy easy with scripts. Its ok to run a lisp from a script, I do it all the time.
    Then you can just issue a qsave, then a close statement.
    Lisps and VBA's run into lots of hangups when trying to close a drawing with SDI set to 0.
    They think of themselves as being run under a drawing so they quit when the drawing closes.
    You should jump to using scripts when you want to close and open another drawing.

    "Odie Silva" <>
    |>Hi all,
    |>
    |>I have almost 300 drawings that I need to open, do few things there, closing
    |>with saving.
    |>
    |>I run a single document variable mode.
    |>
    |>I tried (vla-close myDoc :vlax-true) but it says my drawing is busy...
    |>
    |>if someone could save me same time on this it will be greatly appreciated.
    |>
    |>Odie
    |>

    James Maeding
    Civil Engineer/Programmer
     
    James Maeding, Apr 6, 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.