<?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: Update X,Y coordinates in a shapefile in ArcPad Questions</title>
    <link>https://community.esri.com/t5/arcpad-questions/update-x-y-coordinates-in-a-shapefile/m-p/378561#M2760</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Here's what I did to update x,y in my shapefile.&amp;nbsp; I used the &lt;/SPAN&gt;&lt;STRONG&gt;onfeaturegeometrychanged&lt;/STRONG&gt;&lt;SPAN&gt; event to make a call to my VBScript, which would take my selected position that was moved and re-calc the x,y position.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is the script:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-style:italic;"&gt;Option Explicit&lt;BR /&gt;&lt;BR /&gt;Sub CalcXY&lt;BR /&gt;&lt;BR /&gt;Dim objRS, f, numRecs&lt;BR /&gt;&lt;BR /&gt;Set objRS = Map.Selectionlayer.Records&lt;BR /&gt;objRS.Bookmark = ThisEvent.Bookmark&lt;BR /&gt;&lt;BR /&gt;For Each f in objRS.Fields&lt;BR /&gt; Select Case Ucase(f.name)&lt;BR /&gt;&amp;nbsp; Case "UTM_X" &lt;BR /&gt;&amp;nbsp;&amp;nbsp; f.Value = objRS.Fields.Shape.X&lt;BR /&gt;&amp;nbsp; Case "UTM_Y" &lt;BR /&gt;&amp;nbsp;&amp;nbsp; f.Value = objRS.Fields.Shape.Y&lt;BR /&gt; End Select&lt;BR /&gt;Next&lt;BR /&gt;objRS.Update&lt;BR /&gt;&lt;BR /&gt;End Sub&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Mike&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Dec 2012 18:31:35 GMT</pubDate>
    <dc:creator>MikeRadko</dc:creator>
    <dc:date>2012-12-26T18:31:35Z</dc:date>
    <item>
      <title>Update X,Y coordinates in a shapefile</title>
      <link>https://community.esri.com/t5/arcpad-questions/update-x-y-coordinates-in-a-shapefile/m-p/378560#M2759</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm searching for a solution to update my x,y coordinates written to my shapefile when a feature is moved.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am able to use the GPS to autopopulate the x,y fields in my shapefile when a point is initially collected, but there are some instances where we can't physically get close enough to a feature so we adjust (move) the feature on-screen in arcpad to better represent its true location.&amp;nbsp; However, the x,y coordinates that are stored in the shapefile .dbf are from the original gps location and I need to update those values to the new position.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One thought is to fire off a re-calculation of the x,y attribute fields when a feature is moved.&amp;nbsp; Or to calculate all x,y point features when arcpad closes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyone out there who may have done this before?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Mike&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Dec 2012 14:41:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/update-x-y-coordinates-in-a-shapefile/m-p/378560#M2759</guid>
      <dc:creator>MikeRadko</dc:creator>
      <dc:date>2012-12-24T14:41:57Z</dc:date>
    </item>
    <item>
      <title>Re: Update X,Y coordinates in a shapefile</title>
      <link>https://community.esri.com/t5/arcpad-questions/update-x-y-coordinates-in-a-shapefile/m-p/378561#M2760</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Here's what I did to update x,y in my shapefile.&amp;nbsp; I used the &lt;/SPAN&gt;&lt;STRONG&gt;onfeaturegeometrychanged&lt;/STRONG&gt;&lt;SPAN&gt; event to make a call to my VBScript, which would take my selected position that was moved and re-calc the x,y position.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is the script:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-style:italic;"&gt;Option Explicit&lt;BR /&gt;&lt;BR /&gt;Sub CalcXY&lt;BR /&gt;&lt;BR /&gt;Dim objRS, f, numRecs&lt;BR /&gt;&lt;BR /&gt;Set objRS = Map.Selectionlayer.Records&lt;BR /&gt;objRS.Bookmark = ThisEvent.Bookmark&lt;BR /&gt;&lt;BR /&gt;For Each f in objRS.Fields&lt;BR /&gt; Select Case Ucase(f.name)&lt;BR /&gt;&amp;nbsp; Case "UTM_X" &lt;BR /&gt;&amp;nbsp;&amp;nbsp; f.Value = objRS.Fields.Shape.X&lt;BR /&gt;&amp;nbsp; Case "UTM_Y" &lt;BR /&gt;&amp;nbsp;&amp;nbsp; f.Value = objRS.Fields.Shape.Y&lt;BR /&gt; End Select&lt;BR /&gt;Next&lt;BR /&gt;objRS.Update&lt;BR /&gt;&lt;BR /&gt;End Sub&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Mike&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Dec 2012 18:31:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/update-x-y-coordinates-in-a-shapefile/m-p/378561#M2760</guid>
      <dc:creator>MikeRadko</dc:creator>
      <dc:date>2012-12-26T18:31:35Z</dc:date>
    </item>
  </channel>
</rss>

