ArcGIS Pro 2.7 API Reference Guide
SetDefinition Method (MapSeries)
Example 

ArcGIS.Desktop.Layouts Namespace > MapSeries Class : SetDefinition Method
Sets the CIM definition of the map series. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
public void SetDefinition( 
   CIMMapSeries cimMapSeries
)
Public Sub SetDefinition( _
   ByVal cimMapSeries As CIMMapSeries _
) 

Parameters

cimMapSeries
Example
//Get and modify a map series CIM definition and set the changes back to the layout

//Perform on the worker thread
await QueuedTask.Run(() =>
{
  MapSeries MS = layout.MapSeries as MapSeries;
  CIMMapSeries CIM_MS = MS.GetDefinition();
  CIM_MS.Enabled = false;
  MS.SetDefinition(CIM_MS);
  layout.SetMapSeries(MS);
});
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

MapSeries Class
MapSeries Members