ArcGIS Pro 2.8 API Reference Guide
CreateElement Method (LayoutElementFactory)

ArcGIS.Desktop.Layouts Namespace > LayoutElementFactory Class : CreateElement Method
Layout or GroupElement
The cimElement to be created
Creates an element using the corresponding ArcGIS.Core.CIM.CIMElement definition. This method must be called on the MCT. Use QueuedTask.Run.
Syntax

Parameters

elementContainer
Layout or GroupElement
cimElement
The cimElement to be created

Return Value

Exceptions
ExceptionDescription
This method or property must be called within the lambda passed to QueuedTask.Run.
Remarks
cimElement cannot be of type ArcGIS.Core.CIM.CIMGroupElement or a NotSupportedException will be thrown. Use CreateGroupElement(ILayoutElementContainer) and related overloads to create a group element.
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

LayoutElementFactory Class
LayoutElementFactory Members