VBA and Multiple opening.

Discussion in 'AutoCAD' started by hamid2, Aug 12, 2004.

  1. hamid2

    hamid2 Guest

    Hello Everyone;

    I've got a VBA macro that has to be run at startup. It switchs between layouts and Modelspace and then initial some variables. The problem is when users open a bunch drawing together at the same time. AutoCAD hangs and does not go farther. I have to end the AutoCad task. Seems AutoCAD does not let the Macro finish its job or so and get confused.

    Is there any way to force AutoCAD to run the macro and then opens the next drawing?

    By the way, I unload the micro at the end of its process by calling the UnloadDVB.

    Thank you in advance.
     
    hamid2, Aug 12, 2004
    #1
  2. Read the thread "Loading VBA app upon opening first document" for more
    info, but what it sounds like you need to add an ACADStartup and perform
    your functions there --- ASSUMING this only runs when AutoCAD starts up. If
    you want it run with every drawing as it opens, use an event handler. BTW
    don't unload your dvb and see what happens, too.
    --
    -- Mike
    ___________________________
    Mike Tuersley
    CADalyst's CAD Clinic
    Rand IMAGINiT Technologies
    ___________________________
    the trick is to realize that there is no spoon...
     
    Mike Tuersley, Aug 12, 2004
    #2
  3. hamid2

    hamid2 Guest

    Thanks Mike,

    I'll give it a try and let you know if you are interested.
     
    hamid2, Aug 12, 2004
    #3
  4. I'm sure a lot of people maybe interested. I follow lots of threads to get
    new ideas.

    --

    Thanks,

    David M. Gardner
    Change the DOT to reply.
     
    David M. Gardner, Aug 12, 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.