ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Desktop.Layouts Namespace / IGraphicFactory Interface / CreatePredefinedShapeGraphic Method / CreatePredefinedShapeGraphic(PredefinedShape,MapPoint,Double,Double,CIMPolygonSymbol) Method
The shape type of the graphic
The location of the graphic
The width of the graphic bounding box (required)
The height of the graphic bounding box (optional)
The symbol to be used with the graphic (optional)

In This Topic
    CreatePredefinedShapeGraphic(PredefinedShape,MapPoint,Double,Double,CIMPolygonSymbol) Method
    In This Topic
    Create a polygon graphic of the specified PredefinedShape using the provided extent and size dimension(s), and symbol
    Syntax
    Overloads Function CreatePredefinedShapeGraphic( _
       ByVal shapeType As PredefinedShape, _
       ByVal location As MapPoint, _
       ByVal width As Double, _
       Optional ByVal height As Double, _
       Optional ByVal polySymbol As CIMPolygonSymbol _
    ) As CIMPolygonGraphic

    Parameters

    shapeType
    The shape type of the graphic
    location
    The location of the graphic
    width
    The width of the graphic bounding box (required)
    height
    The height of the graphic bounding box (optional)
    polySymbol
    The symbol to be used with the graphic (optional)

    Return Value

    Remarks
    As a minimum, a width must be provided. If a height is not provided it will be assumed to be the same as the width. Negative width or 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 and height will be ignored. When generating a semicircle or "half-circle" (i.e. PredefinedShape.HalfCircle), if a height is not provided, then it is set to be half the width. 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. For PredefinedShape.RoundedRectangle, a default corner rounding of 20% will be applied.
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 8.1

    See Also