<?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 Re: 8.3 to 10.1  VBA Pan function not working (pEnv.CenterAt) in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/8-3-to-10-1-nbsp-vba-pan-function-not-working-penv/m-p/189504#M4934</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Don't know what the problem is but as you are using vba why not put in a "doevents" call?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Aug 2012 21:43:19 GMT</pubDate>
    <dc:creator>DuncanHornby</dc:creator>
    <dc:date>2012-08-29T21:43:19Z</dc:date>
    <item>
      <title>8.3 to 10.1  VBA Pan function not working (pEnv.CenterAt)</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/8-3-to-10-1-nbsp-vba-pan-function-not-working-penv/m-p/189503#M4933</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have an automated program that pans to a predefined point on a map, makes adjustments like scale, and exports the map.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Under 8.3, it worked flawlessly.&amp;nbsp; Under 10.1, it works for a while then gets "stuck" and all exports after that are of the same map area.&amp;nbsp; I verify that it is being passed new coordinates, but if I check before and after the function the map has not moved.&amp;nbsp; There are also no errors reported.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Its frustrating because it is intermittent.&amp;nbsp; Sometimes it stops working after 5, sometimes 20, sometimes hundreds. And whenever it stops, all calls after that result in the same image being exported because it never moves.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1) Any ideas of how to fix it?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2) Any way to test it to at least catch that it didnt move and throw an error so bad images are not saved?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;Private Sub Pan(dX As Double, dY As Double)
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pMxDoc As IMxDocument
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set pMxDoc = ThisDocument
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pav As IActiveView
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set pav = pMxDoc.FocusMap
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pEnv As IEnvelope
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set pEnv = pav.ScreenDisplay.DisplayTransformation.FittedBounds.Envelope
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pPoint As esriGeometry.IPoint
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set pPoint = New esriGeometry.Point
&amp;nbsp;&amp;nbsp;&amp;nbsp; pPoint.PutCoords dX, dY
&amp;nbsp;&amp;nbsp;&amp;nbsp; pEnv.CenterAt pPoint
&amp;nbsp;&amp;nbsp;&amp;nbsp; pav.ScreenDisplay.DisplayTransformation.VisibleBounds = pEnv
&amp;nbsp;&amp;nbsp;&amp;nbsp; pav.Refresh
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set pav = Nothing
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set pEnv = Nothing
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set pMxDoc = Nothing
&amp;nbsp;&amp;nbsp; 
End Sub&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2012 21:16:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/8-3-to-10-1-nbsp-vba-pan-function-not-working-penv/m-p/189503#M4933</guid>
      <dc:creator>MarlonAmaya1</dc:creator>
      <dc:date>2012-08-29T21:16:21Z</dc:date>
    </item>
    <item>
      <title>Re: 8.3 to 10.1  VBA Pan function not working (pEnv.CenterAt)</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/8-3-to-10-1-nbsp-vba-pan-function-not-working-penv/m-p/189504#M4934</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Don't know what the problem is but as you are using vba why not put in a "doevents" call?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2012 21:43:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/8-3-to-10-1-nbsp-vba-pan-function-not-working-penv/m-p/189504#M4934</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2012-08-29T21:43:19Z</dc:date>
    </item>
    <item>
      <title>Re: 8.3 to 10.1  VBA Pan function not working (pEnv.CenterAt)</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/8-3-to-10-1-nbsp-vba-pan-function-not-working-penv/m-p/189505#M4935</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I usually only use doevents in loops.&amp;nbsp; Not sure how that would help here.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2012 20:07:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/8-3-to-10-1-nbsp-vba-pan-function-not-working-penv/m-p/189505#M4935</guid>
      <dc:creator>MarlonAmaya1</dc:creator>
      <dc:date>2012-09-19T20:07:53Z</dc:date>
    </item>
  </channel>
</rss>

