ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Desktop.Layouts Namespace / Layout Class / GetDefinition Method
Example

In This Topic
    GetDefinition Method (Layout)
    In This Topic
    Returns the element's CIM definition. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    public CIMLayout GetDefinition()
    Public Function GetDefinition() As CIMLayout

    Return Value

    Exceptions
    ExceptionDescription
    This method must be called within the lambda passed to QueuedTask.Run.
    Example
    Layout_GetSetDefinition
    //Modify a layout's CIM definition
    
    //Perform on the worker thread
    await QueuedTask.Run(() =>
    {
      CIMLayout cimLayout = layout.GetDefinition();
    
      //Do something
    
      layout.SetDefinition(cimLayout);
    });
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 8.1

    See Also