Posts: 25
Registered: ‎06-10-2008
Message 1 of 3 (477 Views)

Windows Focus during batch processing

477 Views, 2 Replies
10-19-2010 01:41 PM

I have a VBA program that I'm converting to VB.Net.  The program is a batch process that opens a an excel file, opens a template drawing, adds blocks (listed in the excel file), plots and saves the drawing, then moves on to the next drawing, and so on.  In Autocad 2008 and previous version, the program ran in the background, i.e. I could see what was happening, but it didn't affect the running of other programs (like email).  However, since switching to Autocad 2009 (and 2010, and now 2011), the very same program now steels focus every time a new drawing is created (every few seconds).  We've been running this program for years during normal business hours, but have had to change to running them on a remote VM (which is slower) or at night.


I have since converted the program to vb.net, but I get the same results; windows or autocad keeps returning the focus to the autocad interface.  When I originally started to covert this program, I was going to do everything in the database only (not the user interface), it appears that to plot, though, the drawing must be opened in the interface. 


I can still run the same VBA program in 2008 or 2007 (if I re-install them) and it will run without steeling focus, but the 2007 file format is slightly larger and adds up with the thousands of drawings we are dealing with.  And I want to move to vb.net and 2011.


I sent in a support ticket to autodesk, but they blame it on windows.  We continue to use XP Pro.  So nothing has changed there.


Any ideas what may be causing this issue?



Valued Contributor
Posts: 98
Registered: ‎03-17-2008
Message 2 of 3 (326 Views)

Re: Windows Focus during batch processing

05-09-2011 07:37 AM in reply to: ken.washburn

Anyone have a solution for this?

Valued Contributor
Posts: 98
Registered: ‎03-17-2008
Message 3 of 3 (262 Views)

Re: Windows Focus during batch processing

03-21-2012 11:00 AM in reply to: pjfontes

Download TweakUI from Microsoft


General->Focus->Prevent Applications From Stealing Focus


This helps a lot.. but doesn't eliminate the issue entirely.

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.