ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / Map Class / Animation Property
Example

In This Topic
    Animation Property (Map)
    In This Topic
    Gets the animation for the map.
    Syntax
    Public ReadOnly Property Animation As Animation
    public Animation Animation {get;}
    Example
    Set Animation Length
    {
      var animation = mapView.Map.Animation;
      var duration = animation.Duration;
      if (duration == TimeSpan.Zero)
        return;
    
      var factor = length.TotalSeconds / duration.TotalSeconds;
      animation.ScaleDuration(factor);
    }
    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);
    }
    Camera Keyframes
    {
      var animation = mapView.Map.Animation;
      var cameraTrack = animation.Tracks.OfType<CameraTrack>().First(); //There will always be only 1 CameraTrack in the animation.
      var result = cameraTrack.Keyframes.OfType<CameraKeyframe>().ToList();
      //Use the camera keyframes (if any)
    }
    Requirements

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

    ArcGIS Pro version: 3.0 or higher.
    See Also