ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / Bookmark Class / Update(MapView) Method
The map view used to update the bookmark.
Example

In This Topic
    Update(MapView) Method
    In This Topic
    Updates the bookmark to the current location and time of a map view. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    public void Update( 
       MapView mapView
    )
    Public Sub Update( _
       ByVal mapView As MapView _
    ) 

    Parameters

    mapView
    The map view used to update the bookmark.
    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Example
    Update Bookmark
    public Task UpdateBookmarkAsync(Bookmark bookmark)
    {
      return QueuedTask.Run(() =>
      {
        //Get the active map view.
        var mapView = MapView.Active;
        if (mapView == null)
          return;
    
        //Update the bookmark using the active map view.
        bookmark.Update(mapView);
      });
    }
    Update Bookmark
    public Task UpdateBookmarkAsync(Bookmark bookmark)
    {
      return QueuedTask.Run(() =>
      {
        //Get the active map view.
        var mapView = MapView.Active;
        if (mapView == null)
          return;
    
        //Update the bookmark using the active map view.
        bookmark.Update(mapView);
      });
    }
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 8.1

    See Also