ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Core.CIM Namespace / CIMGeoFeatureLayerBase Class / PreviousObservationsCount Property
Example

In This Topic
    PreviousObservationsCount Property (CIMGeoFeatureLayerBase)
    In This Topic
    Gets or sets the previous observation count.
    Syntax
    public int PreviousObservationsCount {get; set;}
    Public Property PreviousObservationsCount As Integer
    Example
    Set Various Stream Layer properties via the CIM
    //The layer must be track aware and spatial
    if (streamLayer.TrackType != TrackType.Spatial)
      return;
    //Must be on QueuedTask
    //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, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also