TheSwamp
Code Red => VB(A) => Topic started by: Jimmy D 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!
-
if you are using VBA to start acad why don't you just continue and use vba instead of a script ?
-
That is part of the long story.
The user wants to keep using his existing scripts (he doesn't know lisp/VBA).
-
What is it that the script is doing?
-
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.
-
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.
-
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.
-
Can't you shut down Acad in the last line of the script?
-
And start the next VBArun for the nd script?