Visual Basic Customization

Visual Basic Customization

Reply
Active Contributor
CAFMTech
Posts: 38
Registered: ‎03-25-2008
Message 1 of 7 (770 Views)

Test for "drawing is busy"?

770 Views, 6 Replies
05-12-2010 07:41 AM
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.
*Laurie Comerford
Message 2 of 7 (770 Views)

Re: Test for "drawing is busy"?

05-12-2010 01:26 PM 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.
Active Contributor
CAFMTech
Posts: 38
Registered: ‎03-25-2008
Message 3 of 7 (770 Views)

Re: Test for "drawing is busy"?

05-12-2010 01:42 PM 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.
Distinguished Mentor
andrewpuller3811
Posts: 770
Registered: ‎07-30-2008
Message 4 of 7 (770 Views)

Re: Test for "drawing is busy"?

05-12-2010 03:44 PM in reply to: CAFMTech
As you're access the command by calling through lisp what about the EndCommand event?
If this fixed your issue, click on "Accept as Solution"

Andrew Puller
Maitland, NSW, Australia
Windows 7 Enterprise 64bit
Intel core i7 2600 @ 3.40 GHz with 16GB Ram
Civil 3d 2013 64bit
Active Contributor
CAFMTech
Posts: 38
Registered: ‎03-25-2008
Message 5 of 7 (770 Views)

Re: Test for "drawing is busy"?

05-12-2010 03:54 PM 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.
Distinguished Mentor
andrewpuller3811
Posts: 770
Registered: ‎07-30-2008
Message 6 of 7 (770 Views)

Re: Test for "drawing is busy"?

05-12-2010 07:36 PM in reply to: CAFMTech
Sorry I just know what is available in the help for this one.
If this fixed your issue, click on "Accept as Solution"

Andrew Puller
Maitland, NSW, Australia
Windows 7 Enterprise 64bit
Intel core i7 2600 @ 3.40 GHz with 16GB Ram
Civil 3d 2013 64bit
Active Member
elliottpd1
Posts: 6
Registered: ‎01-07-2010
Message 7 of 7 (770 Views)

Re: Test for "drawing is busy"?

05-16-2010 08:26 AM 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"
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.