ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Layouts Namespace / IElementFactory Interface / CreatePredefinedShapeGraphicElement Method / CreatePredefinedShapeGraphicElement(IElementContainer,PredefinedShape,MapPoint,Double,Double,CIMPolygonSymbol,String,Boolean,ElementInfo) Method
The parent element container
The shape type of the graphic
The location of the graphic
The width of the graphic bounding box (optional)
The height of the graphic bounding box (optional)
The symbol to be used with the graphic (optional)
An element name (optional)
Select after create flag (default is true) (optional)
Additional element properties (optional)
Version

CreatePredefinedShapeGraphicElement(IElementContainer,PredefinedShape,MapPoint,Double,Double,CIMPolygonSymbol,String,Boolean,ElementInfo) Method
Create a polygon graphic of the specified PredefinedShape using the provided location, optional size dimensions, and symbol.
Syntax

Parameters

elementContainer
The parent element container
shapeType
The shape type of the graphic
location
The location of the graphic
width
The width of the graphic bounding box (optional)
height
The height of the graphic bounding box (optional)
polySymbol
The symbol to be used with the graphic (optional)
elementName
An element name (optional)
select
Select after create flag (default is true) (optional)
elementInfo
Additional element properties (optional)

Return Value

Remarks
If neither a width or height is provided, the dimensions of the graphic bounding box will use a predefined system default. If only one of width or height is provided then the dimensions will be assumed to be equal. Negative width and height values will be treated the same as if they were missing. When generating a circle (i.e. PredefinedShape.Circle) width is used as the circle diameter. When generating an ellipse (i.e. PredefinedShape.Ellipse) width and height are assumed to be the length of the two axis - major/minor depending on which dimension is the longest.
Requirements

Target Platforms: Windows 11, Windows 10

ArcGIS Pro version: 3 or higher.
See Also