ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / Bookmark Class / GetDefinition Method
Example Version

GetDefinition Method (Bookmark)
Returns the CIM definition of the bookmark. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
public CIMBookmark GetDefinition()

Return Value

The definition of the bookmark.
Exceptions
ExceptionDescription
This method or property must be called within the lambda passed to QueuedTask.Run.
Example
Update Extent for a Bookmark
public Task UpdateBookmarkExtentAsync(Bookmark bookmark, ArcGIS.Core.Geometry.Envelope envelope)
{
  return QueuedTask.Run(() =>
  {
    //Get the bookmark's definition
    var bookmarkDef = bookmark.GetDefinition();

    //Modify the bookmark's location
    bookmarkDef.Location = envelope;

    //Clear the camera as it is no longer valid.
    bookmarkDef.Camera = null;

    //Set the bookmark definition
    bookmark.SetDefinition(bookmarkDef);
  });
}
Requirements

Target Platforms: Windows 11, Windows 10

ArcGIS Pro version: 3 or higher.
See Also