2 Replies Latest reply on Dec 6, 2010 10:34 AM by desrochersa

    Running a script at the beginning of polyline entry

    desrochersa
      Hello,
      I am recording data along polylines (transects) with Arcpad 10 running on my GPS. I would like to have beginning and end times for each feature (transect). So I would like to run a simple script at the beginning of capture of polyline, specifically to get GPS time. "Onfeatureadded" event fires only when the capture of vertices is completed and thus can only give GPS time of the end of polyline capture. Is there an event specific to the beginning of polyline capture?
      Thanks
        • Re: Running a script at the beginning of polyline entry
          ivankautter
          I don't have the exact code for you but you might try something like this if you are using GPS position averaging for vertices. 

          Use the OnAverageStart event of the GPS object to run a code that will get and hold the GPS time in a variable that is accessible out of scope.  Since this code will run with each new positioning averaging event, you will need some code to restrict the time capture to the first averaging event.  Then perhaps at the OnFeatureAdded event, you can capture the end time, write the start and end times to appropriate fields or what have you and clear out the global variable that holds the beginning time.
          • Re: Running a script at the beginning of polyline entry
            desrochersa
            Thanks Ivan for the advice, I will check how to turn on vertex position averaging and do as you suggest, which should not be too complicated. If and when I get working code, I will post it.
            Cheers.