ArcGIS Pro 2.7 API Reference Guide
AddElements Method

ArcGIS.Desktop.Mapping Namespace > GraphicsLayerExtensions Class : AddElements Method
The collection of graphics to be added
Add a collection of ArcGIS.Desktop.Layouts.GraphicElement based on the list of ArcGIS.Core.CIM.CIMGraphic. This method must be called on the MCT. Use QueuedTask.Run
Syntax

Parameters

graphicsLayer
graphics
The collection of graphics to be added

Return Value

Exceptions
ExceptionDescription
This method or property must be called within the lambda passed to QueuedTask.Run.
The value cannot be null: graphics
Map has reached maximum graphics count limit of 4000 elements. One or more elements cannot be created.
Map has reached maximum graphics size limit of 10 MB. One or more elements cannot be created.
Remarks
The map view displaying the graphics layer should be initialized.
o ArcGIS.Core.CIM.CIMMultipointGraphic is not supported
o ArcGIS.Core.CIM.CIMInkGraphic is not supported
o ArcGIS.Core.CIM.CIMMultiPatchGraphic is not supported
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

GraphicsLayerExtensions Class
GraphicsLayerExtensions Members