How To: Update a recordset with events from the TrackingLayer
Events on the MapObjects TrackingLayer are temporary. The following Visual Basic code sample demonstrates how to store the events permanently in a shapefile or an existing ArcSDE layer.
- Declare the following variables:
Dim tl As MapObjects2.TrackingLayer
Dim recs As MapObjects2.Recordset
- Return the recordset that you want to edit:
Set recs = Map1.Layers(0).Records
- Loop through the events that currently reside on the Tracking Layer and update the recordset:
Dim i As Integer
For i = 0 To tl.EventCount - 1
Set recs.Fields("Shape").Value = tl.Event(i).Shape
Change the library name from MapObjects2 to MapObjects to use the code in a MapObjects 1.x project. MapObjects 1.x supports only point shapes as events.