ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Core.CIM Namespace / CIMGeoFeatureLayerBase Class / ShowTracks Property
Example

In This Topic
    ShowTracks Property
    In This Topic
    Gets or sets a value indicating whether track lines are being drawn.
    Syntax
    Public Property ShowTracks As Boolean
    public bool ShowTracks {get; set;}
    Example
    Set Stream Layer properties via the CIM
    {
      //The layer must be track aware and spatial
      if (streamLayer.TrackType != TrackType.Spatial)
      {
        // not track aware and spatial
      }
      // Note: call within QueuedTask.Run()
      {
        //get the CIM Definition
        var def = streamLayer.GetDefinition() as CIMFeatureLayer;
        //set the number of previous observations, 
        def.PreviousObservationsCount = (int)streamLayer.GetExpirationMaxCount() - 1;
        //set show previous observations and track lines to true
        def.ShowPreviousObservations = true;
        def.ShowTracks = true;
        //commit the changes
        streamLayer.SetDefinition(def);
      }
    }
    Requirements

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

    ArcGIS Pro version: 3.0 or higher.
    See Also