ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / FeatureLayer Class / IsTrackAware Property
Example

In This Topic
    IsTrackAware Property
    In This Topic
    Gets whether this Feature Layer supports track related functionality.
    Syntax
    Public ReadOnly Property IsTrackAware As Boolean
    public bool IsTrackAware {get;}
    Example
    Find all Stream Layers that are Track Aware
    {
      var trackAwareLayers = MapView.Active.Map.GetLayersAsFlattenedList()
                                 .OfType<StreamLayer>().Where(sl => sl.IsTrackAware)?.ToList();
    }
    Get the Track Id Field
    {
      if (streamLayer.IsTrackAware)
      {
        var trackField = streamLayer.TrackIdFieldName;
        //TODO use the field name
      }
    }
    Set the Maximum Count of Previous Observations to be Stored in Memory
    {
      // Note: call within QueuedTask.Run()
      {
        //Set Expiration Method and Max Expiration Count
        if (streamLayer.GetExpirationMethod() != FeatureExpirationMethod.MaximumFeatureCount)
          streamLayer.SetExpirationMethod(FeatureExpirationMethod.MaximumFeatureCount);
        streamLayer.SetExpirationMaxCount(15);
        //FYI
        if (streamLayer.IsTrackAware)
        {
          //MaxCount is per track! otherwise for the entire layer
        }
      }
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also