forcing vba to wait

forcing vba to wait

Anonymous
Not applicable
628 Views
2 Replies
Message 1 of 3

forcing vba to wait

Anonymous
Not applicable
I have a VBA program that opens a new drawing and then prompts the user to select a point on the screen. Everything works fine but when a new drawing is opened several programs and events (ie Softdesk and VBA) run and my program keeps asking for a point causing errors. Is it possible to wait for everything to load before it asks for the point?

Thank you in advance.
Jamie Gamauf
0 Likes
629 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
I'm going to be watching this post and I hope you get a good response because I had the same problem. My solution is klunky but it worked for me. I'd certainly think that there's a better way...But, here's what I did. I had my VB code write an entry to the registry. Just a flag that I set to "0". Then, in my MNL and other routines that tried to load, I had them check that setting, and bypass whatever they were trying to do until the value became "1". Then once everything ran it's course and my VB finished up, I had the code set the value to "1" and this time when the drawing opened, the other routines could do their thing.

Hope this helps, or at least sparks another idea,
Guy
0 Likes
Message 3 of 3

Anonymous
Not applicable
Jamie,

 

You might want to check out using the IsQuiecent
property of the AcadState object. There is an example in the AutoCAD 2000i
help.

 

Wayne


style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
I
have a VBA program that opens a new drawing and then prompts the user to
select a point on the screen. Everything works fine but when a new drawing is
opened several programs and events (ie Softdesk and VBA) run and my program
keeps asking for a point causing errors. Is it possible to wait for everything
to load before it asks for the point?

Thank you in advance.
Jamie Gamauf

0 Likes