ArcGIS Pro 3.1 API Reference Guide
ArcGIS.Desktop.Layouts Namespace / IGraphicFactory Interface / CreateSimpleTextGraphic Method
The type of text graphic to create
The geometry for the resulting graphic
The text symbol to be used with the graphic (optional)
The text string (optional)

In This Topic
    CreateSimpleTextGraphic Method (IGraphicFactory)
    In This Topic
    Creates a text graphic based on the input geometry, symbol, and text.
    Syntax
    Function CreateSimpleTextGraphic( _
       ByVal textType As TextType, _
       ByVal geometry As Geometry, _
       Optional ByVal textSymbol As CIMTextSymbol, _
       Optional ByVal text As String _
    ) As CIMTextGraphicBase

    Parameters

    textType
    The type of text graphic to create
    geometry
    The geometry for the resulting graphic
    textSymbol
    The text symbol to be used with the graphic (optional)
    text
    The text string (optional)

    Return Value

    Remarks
    For:
    • TextType.PointText use a point
    • TextType.SplinedText use a polyline (straight or curved)
    • TextType.CircleParagraph use a circle (polygon)
    • TextType.EllipseParagraph use an ellipse (polygon)
    • TextType.RectangleParagraph use an envelope
    • TextType.PolygonParagraph use a polygon
    For TextType.PointText and TextType.SplinedText, cast the returned CIMTextGraphicBase to ArcGIS.Core.CIM.CIMTextGraphic. For all paragraph text types cast to ArcGIS.Core.CIM.CIMParagraphTextGraphic.
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.0 or higher.
    See Also