How can I have my VBA wait until Autocad is quiescent?

Discussion in 'AutoCAD' started by jawf, Sep 2, 2005.

  1. jawf

    jawf Guest

    I have a VB6 prog that runs and fires a invisible instance of Autocad
    2000i. The VB has detection code to prevent it from running if there is
    an instance of AutoCad already running. I would like to work that back
    the other way as well. I want to prevent the user from running an
    instance of AutoCad if the VB fired instance is already running. I can
    detect the already running instance (fired from the VB), and I can put
    up a note to the user to please close the instance of AutoCad that they
    just fired, but I get a "Autocad is busy.." notice when I try to close
    it. That's because AutoCad hasn't finished it's initialization routine.
    Now to the question: Is there some way to wait for AutoCad to get
    quiescent before putting up a message.? I have tried loops (keeps
    autocad busy), do events (doesn't help). BTW the DVB has a ACADStartup
    routine already. It limits me because any dialog I try there is seen
    when the VB instance is started.

    Any help would be appreciated
    Thanks
    JWatkins
     
    jawf, Sep 2, 2005
    #1
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.