ArcGIS Pro 2.7 API Reference Guide
CreateLayout(CIMPage) Method
Example 

ArcGIS.Desktop.Layouts Namespace > LayoutFactory Class > CreateLayout Method : CreateLayout(CIMPage) Method
CIMPage
Creates a new layout using a defined CIM page. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
public Layout CreateLayout( 
   CIMPage page
)
Public Overloads Function CreateLayout( _
   Optional ByVal page As CIMPage _
) As Layout

Parameters

page
CIMPage

Return Value

Returns Layout or a null.
Exceptions
ExceptionDescription
This method must be called within the lambda passed to QueuedTask.Run.
Example
//This example creates a new layout using a minimum set of parameters.

//Added references
using ArcGIS.Desktop.Layouts;                    
using ArcGIS.Desktop.Framework.Threading.Tasks; 
using ArcGIS.Desktop.Core;

public class CreateLayoutEx1
{
  async public static Task<Layout> CreateBasicLayout(double width, double height, LinearUnit units, string LayoutName)
  {
    Layout layout = null;
    await QueuedTask.Run(() =>
    {
      layout = LayoutFactory.Instance.CreateLayout(width, height, units);
      layout.SetName(LayoutName);
    });

    //Open the layout in a pane
    await ProApp.Panes.CreateLayoutPaneAsync(layout);

    return layout;
  }
}
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

LayoutFactory Class
LayoutFactory Members
Overload List