Select to view content in your preferred language

Route Collection Application (ArcPad Studio and VB-script)

660
0
07-23-2010 11:10 AM
KlasKarlsson
Deactivated User
Hello!

I'm building a route collection application based on ArcPad (presently 8SP4). The software will based on user attributes save track points from GPS to a shape file automatically. At the same time the user will record other interesting points (also from GPS) by filling in a custom form. All this is working OK, but my users will be furious if I release the application as it is.

By the way, I do not want to use the built in tracklog (I hate it and think it is useless).

My present problem is that I can not add points to the track points shape file and keep it invisible (visible=false). This triggers a constant refresh of the layer every time a new point is recorded. This is annoying and slows down the application. (I can turn the layer off and keep recording, but as soon as I record a point to the other shape file it becomes visible again.)

I need a way ether to regulate refreshes manually (in code) or to keep the layer invisible so no refresh is needed. Other suggestions is also welcome...

The event is triggered by the System Objects GPS onposition event.

Sub AddRoutePoint() 'Called by onposition event
   if Logging then 'True if logging is activated
   GetGpsMGRS 'Sub that reads GPS and populates global variables
   Dim RouteLayer, RouteSel, RouteRS
   Set RouteLayer = map.Layers("Route") 'This refers to my route points shape file layer
   If RouteLayer.CanEdit Then
      RouteLayer.Editable = True
      Call Map.AddFeatureXY(GpsX,GpsY, false) 'Global GPS variables
      Set RouteSel = Application.Map.SelectionLayer
      Set RouteRS = RouteSel.Records
      RouteRS.Bookmark = Map.SelectionBookmark
      RouteRS.Fields("MGRS").Value = gpsMGRS
      RouteRS.Fields("RouteType").Value = RouteType
      RouteRS.Fields("RouteWidt").Value = LaneNumbers
      RouteRS.Fields("RouteStat").Value = RouteStatus
      RouteRS.Fields("GPS_HDOP").Value = gpsHDOP
      RouteRS.Fields("GPS_SOG").Value = gpsSOG
      RouteRS.Fields("GPS_COG").Value = gpsCOG
      RouteRS.Update
   end if
   end if
End Sub


A thought: Is it possible to avoid the problem if the route points was recorded to a polyline shape file?
Another thought: Is it possible to add the points to a shape file that is NOT opened in the application, and thereby avoiding the problem?

Regards

Klas Karlsson, SWEDEN
Tags (3)
0 Kudos
0 Replies