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

In This Topic
    GetDefinition Method (Bookmark)
    In This Topic
    Returns the CIM definition of the bookmark. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    Public Function GetDefinition() As CIMBookmark
    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
    {
      // Note : Needs QueuedTask to run
      {
        //Get the bookmark's definition
        var bookmarkDef = oldBookmark.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
        oldBookmark.SetDefinition(bookmarkDef);
      }
    }
    Requirements

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

    ArcGIS Pro version: 3.0 or higher.
    See Also