ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Core.Data.Realtime Namespace / RealtimeFeatureClassDefinition Class / GetTrackIDField Method
Example

In This Topic
    GetTrackIDField Method (RealtimeFeatureClassDefinition)
    In This Topic
    Gets the track ID field name. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    public string GetTrackIDField()
    Public Function GetTrackIDField() As String

    Return Value

    The name of track id field.
    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Remarks

    Values from this field indicate which track features belong to.

    If the table has a TrackID field, then you can renderer previous observations with different symbology and/or draw lines by connecting those observation locations.

    Also refer to ArcGIS.Deskop.Mapping.StreamLayer.SetPreviousObservationsRenderer and ArcGIS.Deskop.Mapping.StreamLayer.SetTrackLinesRenderer for more details.

    Example
    Get the Track Id Field from the Realtime Feature class
    //Must be on QueuedTask
    using (var rfc = streamLayer.GetFeatureClass())
    using (var rfc_def = rfc.GetDefinition())
    {
      if (rfc_def.HasTrackIDField())
      {
        var fld_name = rfc_def.GetTrackIDField();
    
      }
    }
    
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 8.1

    See Also