Author Topic: Acad busy?  (Read 4020 times)

0 Members and 1 Guest are viewing this topic.

Jimmy D

  • Guest
Acad busy?
« on: June 01, 2005, 09:42:07 AM »
Hi,

I'll try to explain in short what I'm attempting to do (don't ask me why, it's a long story).

From Word (VBA) I'm starting AcadApp, open a drawing and start a script.
Then, AFTER the script has finished, I want to close the AcadApp (to free memory this must be done) and I start AcadApp again, open the drawing and start script 2, and so on...
The problem is that while the script is still running in Acad, VBA continues without checking if the script has finished and it closes AcadApp premature...

Here's the question: how do I check that Acad is not busy and the script is finished before I shut it down (I tried GetAcadState.IsQuiescent in a loop but this doesn't seem to work)??


Thanks in advance!

hendie

  • Guest
Acad busy?
« Reply #1 on: June 01, 2005, 10:28:37 AM »
if you are using VBA to start acad why don't you just continue and use vba instead of a script ?

Jimmy D

  • Guest
Acad busy?
« Reply #2 on: June 02, 2005, 01:51:29 AM »
That is part of the long story.
The user wants to keep using his existing scripts (he doesn't know lisp/VBA).

daron

  • Guest
Acad busy?
« Reply #3 on: June 02, 2005, 07:45:28 AM »
What is it that the script is doing?

Jimmy D

  • Guest
Acad busy?
« Reply #4 on: June 02, 2005, 07:50:26 AM »
The script is frezing/thawing layers, makes interferances, plots,....
The user wants to keep his scripts because he can easily modify them. It was easy to write a program that selects the scripts one at a time and pass them over to Acad, but sometimes VBA seems to overtake Acad and the script stops in the middle of a command.

daron

  • Guest
Acad busy?
« Reply #5 on: June 02, 2005, 07:57:54 AM »
Is anyone aware if it's possible to freeze/thaw layers through OBDX? If so, that would be cool, because you do that without ever opening a drawing and it can be batched.

whdjr

  • Guest
Acad busy?
« Reply #6 on: June 02, 2005, 08:23:22 AM »
Quote from: Daron
Is anyone aware if it's possible to freeze/thaw layers through OBDX?

Yes it can be done with ObjectDBX.

DISCLAIMER:  I have not tested this however the properties are visible thru ODBX so I 'assume' it would work.

Amsterdammed

  • Swamp Rat
  • Posts: 507
  • Revit MEP 2016 Acad2013, OPEN DCL
Acad busy?
« Reply #7 on: June 03, 2005, 09:17:11 AM »
Can't you shut down Acad in the last line of the script?
Bernd

Amsterdammed

  • Swamp Rat
  • Posts: 507
  • Revit MEP 2016 Acad2013, OPEN DCL
Acad busy?
« Reply #8 on: June 03, 2005, 09:18:15 AM »
And start the next VBArun for the nd script?
Bernd