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

In This Topic
    HasTrackIDField Method (RealtimeFeatureClassDefinition)
    In This Topic
    Gets a value indicating whether this feature class has a field whose values are used to group features in tracks. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    public bool HasTrackIDField()
    Public Function HasTrackIDField() As Boolean

    Return Value

    true if this table has a field containing track ids; otherwise, false.
    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Remarks

    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
    Check the Realtime Feature Class is Track Aware
    using (var rfc = streamLayer.GetFeatureClass())
    using (var rfc_def = rfc.GetDefinition())
    {
      if (rfc_def.HasTrackIDField())
      {
        //Track aware
      }
    }
    
    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