VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Test for "drawing is busy"?

6 REPLIES 6
Reply
Message 1 of 7
CAFMTech
994 Views, 6 Replies

Test for "drawing is busy"?

Hi,
I am trying to automate a publishing process over a series of drawings. I open a drawing, issue LISP commands from my VBA macro that start the publishing, and then close that drawing and open the next in the series.

The problem is that the publishing takes a little while, and my procedure does not wait for it to complete before attempting to close the current drawing and open the next. I get a "Drawing is Busy" error.

My question is this: is there a way to test for when the drawing is busy? Maybe a property of the drawing object that I could get and just loop until it indicated the drawing is no longer busy and I can close it?

Or is there a better solution that someone can offer for this problem? I will greatly appreciate any help.

Thanks.
6 REPLIES 6
Message 2 of 7
Anonymous
in reply to: CAFMTech

Hi ASCRT,

Why not use the VBA tools to do the plots?

Alternatively read up on IsQuiescent (if I've get the spelling right).
I've not had to use it, so am unfamiliar with its detail, but it has
often been mentioned here.

Regards,

Laurie Comerford


ASCRT wrote:
> Hi,
> I am trying to automate a publishing process over a series of drawings. I open a drawing, issue LISP commands from my VBA macro that start the publishing, and then close that drawing and open the next in the series.
>
> The problem is that the publishing takes a little while, and my procedure does not wait for it to complete before attempting to close the current drawing and open the next. I get a "Drawing is Busy" error.
>
> My question is this: is there a way to test for when the drawing is busy? Maybe a property of the drawing object that I could get and just loop until it indicated the drawing is no longer busy and I can close it?
>
> Or is there a better solution that someone can offer for this problem? I will greatly appreciate any help.
>
> Thanks.
Message 3 of 7
CAFMTech
in reply to: CAFMTech

Hi Laurie,

Thanks very much for your response. This plot is actually a proprietary function of an .arx application, so I haven't been able to find any options for running it other than calling those functions through LISP.

I did try your suggestion of using "IsQuiescent"...the problem I'm having (that someone else reported as well) is that it never returns TRUE, so I'm essentially waiting forever. I'm going to keep working on it, but don't have very high hopes.

Do you have any other suggestions? Thanks for the help.
Message 4 of 7
andrewpuller3811
in reply to: CAFMTech

As you're access the command by calling through lisp what about the EndCommand event?


If a post provides a fix for your issue, click on "Accept as Solution" to help other users find solutions to problems they might have that are similar to yours.

Andrew Puller
Maitland, NSW, Australia
Windows 10 Enterprise 64bit
Intel core i7 11800 @ 2.30 GHz with 32GB Ram
Civil 3d 2021
Message 5 of 7
CAFMTech
in reply to: CAFMTech

Hi,

I'm afraid that I don't know anything about the endcommand event, but I will look it up in the documentation. If you have any examples please pass them along. Thanks for your help.
Message 6 of 7
andrewpuller3811
in reply to: CAFMTech

Sorry I just know what is available in the help for this one.


If a post provides a fix for your issue, click on "Accept as Solution" to help other users find solutions to problems they might have that are similar to yours.

Andrew Puller
Maitland, NSW, Australia
Windows 10 Enterprise 64bit
Intel core i7 11800 @ 2.30 GHz with 32GB Ram
Civil 3d 2021
Message 7 of 7
elliottpd1
in reply to: CAFMTech

Here's how I did this:
- in VBA set the USERS1 variable to "Not Ready" then monitor that variable in a loop until it is reset to "Ready" by the lisp program.
- in the Lisp program, at the end , set the USERS1 variable to "Ready"

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost