<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Problem with screen updating in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/problem-with-screen-updating/m-p/1945695#M25808</link>
    <description>I have a very intense macro that is working on 43000+ 3D polylines.  It has to zoom into each polyline segment and then perform a localized search for adjacent polylines and then do some detective work before moving on the the next segments and polylines.&lt;BR /&gt;
&lt;BR /&gt;
The macro is working 100% correctly but I have two fundamental annoyances I do not know how to fix.&lt;BR /&gt;
&lt;BR /&gt;
After a few thousand zoomwindows Autocad decides to stop updating the screen.  It is still working, but not apparent to the user.  How can I avoid this problem?&lt;BR /&gt;
&lt;BR /&gt;
I thought it was do do with using modemacro but that does not seem to be the problem as it happens if i use modemacro or not.  Note that with modemacro i show a percentage complete in 5 unit steps. so that is not alot of statusbar updating at all.&lt;BR /&gt;
&lt;BR /&gt;
I have looked at the forum and tried DoEvent which did not seem to help me.  Ideally, the screen will atleast keep refreshing.  I am assuming it has to refresh for the select(crossing) to function correctly.&lt;BR /&gt;
&lt;BR /&gt;
And advice greatly appreciated before i gain a few more grey hairs.&lt;BR /&gt;
&lt;BR /&gt;
Andrew</description>
    <pubDate>Thu, 19 Apr 2007 16:23:42 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2007-04-19T16:23:42Z</dc:date>
    <item>
      <title>Problem with screen updating</title>
      <link>https://forums.autodesk.com/t5/vba-forum/problem-with-screen-updating/m-p/1945695#M25808</link>
      <description>I have a very intense macro that is working on 43000+ 3D polylines.  It has to zoom into each polyline segment and then perform a localized search for adjacent polylines and then do some detective work before moving on the the next segments and polylines.&lt;BR /&gt;
&lt;BR /&gt;
The macro is working 100% correctly but I have two fundamental annoyances I do not know how to fix.&lt;BR /&gt;
&lt;BR /&gt;
After a few thousand zoomwindows Autocad decides to stop updating the screen.  It is still working, but not apparent to the user.  How can I avoid this problem?&lt;BR /&gt;
&lt;BR /&gt;
I thought it was do do with using modemacro but that does not seem to be the problem as it happens if i use modemacro or not.  Note that with modemacro i show a percentage complete in 5 unit steps. so that is not alot of statusbar updating at all.&lt;BR /&gt;
&lt;BR /&gt;
I have looked at the forum and tried DoEvent which did not seem to help me.  Ideally, the screen will atleast keep refreshing.  I am assuming it has to refresh for the select(crossing) to function correctly.&lt;BR /&gt;
&lt;BR /&gt;
And advice greatly appreciated before i gain a few more grey hairs.&lt;BR /&gt;
&lt;BR /&gt;
Andrew</description>
      <pubDate>Thu, 19 Apr 2007 16:23:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/problem-with-screen-updating/m-p/1945695#M25808</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-04-19T16:23:42Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with screen updating</title>
      <link>https://forums.autodesk.com/t5/vba-forum/problem-with-screen-updating/m-p/1945696#M25809</link>
      <description>I just wanted to say that after two hours of the screen staying white, the macro completed successfully.&lt;BR /&gt;
&lt;BR /&gt;
So, as per my original post, this is what I am trying to achieve:&lt;BR /&gt;
&lt;BR /&gt;
How can I ensure the screen updated for the life of the routine&lt;BR /&gt;
&lt;BR /&gt;
OR&lt;BR /&gt;
&lt;BR /&gt;
If the Select(crossing) does not need to be literally visible, how can I stop it from updating the screen?&lt;BR /&gt;
&lt;BR /&gt;
Eitherway, I want to give the user feedback.  They need to know the routine is running, and a blank white screen can be alarming.&lt;BR /&gt;
&lt;BR /&gt;
I hope someone can give me any practical assistance with this matter.&lt;BR /&gt;
&lt;BR /&gt;
Thank you.&lt;BR /&gt;
&lt;BR /&gt;
Andrew</description>
      <pubDate>Thu, 19 Apr 2007 17:09:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/problem-with-screen-updating/m-p/1945696#M25809</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-04-19T17:09:27Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with screen updating</title>
      <link>https://forums.autodesk.com/t5/vba-forum/problem-with-screen-updating/m-p/1945697#M25810</link>
      <description>You can use DoEvents in your code each time it loops. This will keep Autocad Alive and use userform.repaint to keep the form alive. &lt;BR /&gt;
&lt;BR /&gt;
If you want it to stop updating the screen you can &lt;BR /&gt;
&lt;BR /&gt;
Declare Function LockWindowUpdate Lib "user32" (ByVal hWndLock As Long) As Long&lt;BR /&gt;
&lt;BR /&gt;
LockWindowUpdate ThisDrawing.hWnd&lt;BR /&gt;
&lt;BR /&gt;
do stuff&lt;BR /&gt;
&lt;BR /&gt;
LockWindowUpdate 0</description>
      <pubDate>Thu, 19 Apr 2007 20:09:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/problem-with-screen-updating/m-p/1945697#M25810</guid>
      <dc:creator>arcticad</dc:creator>
      <dc:date>2007-04-19T20:09:53Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with screen updating</title>
      <link>https://forums.autodesk.com/t5/vba-forum/problem-with-screen-updating/m-p/1945698#M25811</link>
      <description>Hello&lt;BR /&gt;
&lt;BR /&gt;
I did try putting DoEvents inside the loop and it did not seem to have an affect.  The only difference was that it "stopped" showing the new zoom locations as opposed to turning blank.&lt;BR /&gt;
&lt;BR /&gt;
I don't have a userform showing progress as this routine has no user specifiable parameters.  So my progress is in the status bar.&lt;BR /&gt;
&lt;BR /&gt;
Is it going to be better in a form?&lt;BR /&gt;
&lt;BR /&gt;
Andrew</description>
      <pubDate>Fri, 20 Apr 2007 05:54:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/problem-with-screen-updating/m-p/1945698#M25811</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-04-20T05:54:14Z</dc:date>
    </item>
  </channel>
</rss>

