Running a script at the beginning of polyline entry

597
2
12-04-2010 10:51 AM
AndréDesrochers
New Contributor
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
Tags (3)
0 Kudos
2 Replies
IvanKautter
New Contributor III
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.
0 Kudos
AndréDesrochers
New Contributor
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.
0 Kudos