ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / Animation Class / ScaleDuration Method / ScaleDuration(TimeSpan,TimeSpan,Double) Method
The start time to scale.
The end time to scale.
The factor to scale by.
Example

In This Topic
    ScaleDuration(TimeSpan,TimeSpan,Double) Method
    In This Topic
    Adjust the length of the track by a given scale factor.
    Syntax
    Public Overloads Sub ScaleDuration( _
       ByVal start As TimeSpan, _
       ByVal end As TimeSpan, _
       ByVal factor As Double _
    ) 
    public void ScaleDuration( 
       TimeSpan start,
       TimeSpan end,
       double factor
    )

    Parameters

    start
    The start time to scale.
    end
    The end time to scale.
    factor
    The factor to scale by.
    Example
    Scale Animation
    {
      var animation = mapView.Map.Animation;
      var duration = animation.Duration;
      if (duration == TimeSpan.Zero || duration <= afterTime)
      {
        // Nothing to scale, leave
      }
    
      var factor = length.TotalSeconds / (duration.TotalSeconds - afterTime.TotalSeconds);
      animation.ScaleDuration(afterTime, duration, factor);
    }
    Requirements

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

    ArcGIS Pro version: 3.0 or higher.
    See Also