ArcGIS Pro 3.1 API Reference Guide
ArcGIS.Desktop.Layouts Namespace / GraphicFactory Class / CreatePredefinedShapeGraphic Method / CreatePredefinedShapeGraphic(PredefinedShape,Envelope,CIMPolygonSymbol) Method
The shape type of the graphic
The graphic bounding box
The symbol to be used with the graphic (optional)

In This Topic
    CreatePredefinedShapeGraphic(PredefinedShape,Envelope,CIMPolygonSymbol) Method
    In This Topic
    Create a polygon graphic of the specified PredefinedShape using the provided bounds and symbol. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    Public Overloads Function CreatePredefinedShapeGraphic( _
       ByVal shapeType As PredefinedShape, _
       ByVal bounds As Envelope, _
       Optional ByVal polySymbol As CIMPolygonSymbol _
    ) As CIMPolygonGraphic

    Parameters

    shapeType
    The shape type of the graphic
    bounds
    The graphic bounding box
    polySymbol
    The symbol to be used with the graphic (optional)

    Return Value

    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    empty or null geometry
    Remarks
    For PredefinedShape.Circle, the height of the resulting bounding box for the graphic will be set equal to the width. For PredefinedShape.RoundedRectangle, a default corner rounding of 20% will be applied.
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.0 or higher.
    See Also