ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Layouts Namespace / Layout Class / SetDefinition Method
CIMLayout
Example Version

SetDefinition Method (Layout)
Applies the changes made to a modified ArcGIS.Core.CIM.CIMLayout back to the element on the page layout. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
public void SetDefinition( 
   CIMLayout cimLayout
)

Parameters

cimLayout
CIMLayout
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

ArcGIS Pro version: 3 or higher.
See Also