ArcGIS Pro 3.7 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 Function HasTrackIDField() As Boolean
    public bool HasTrackIDField()

    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
    {
      // Note: call within QueuedTask.Run()
      {
        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
    {
      // Note: call within QueuedTask.Run()
      {
        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 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also