ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Core.CIM Namespace / CIMGraphicFrame Class
Members Example

In This Topic
    CIMGraphicFrame Class
    In This Topic
    Represents a graphic frame.
    Object Model
    CIMGraphicFrame ClassCIMSymbolReference ClassCIMSymbolReference ClassCIMGraphicFrame ClassCIMGraphicFrame ClassCIMSymbolReference Class
    Syntax
    Example
    Create Rectangle Paragraph Text Element 1
    {
      //Note: Must be on QueuedTask.Run
      //Create rectangle text with background and border symbology.  
      //Build 2D polygon geometry
      List<Coordinate2D> plyCoords = new List<Coordinate2D>();
      plyCoords.Add(new Coordinate2D(3.5, 7));
      plyCoords.Add(new Coordinate2D(4.5, 7));
      plyCoords.Add(new Coordinate2D(4.5, 6.7));
      plyCoords.Add(new Coordinate2D(5.5, 6.7));
      plyCoords.Add(new Coordinate2D(5.5, 6.1));
      plyCoords.Add(new Coordinate2D(3.5, 6.1));
      Polygon poly = PolygonBuilderEx.CreatePolygon(plyCoords);
    
      //Set symbology, create and add element to layout
      //Also notice how formatting tags are using within the text string.
      CIMTextSymbol sym = SymbolFactory.Instance.ConstructTextSymbol(
                        ColorFactory.Instance.GreyRGB, 10, "Arial", "Regular");
      string text = "Some Text String that is really long and is " +
                    "<BOL>forced to wrap to other lines</BOL> so that " +
                    "we can see the effects." as String;
    
      GraphicElement polyTxtElm = ElementFactory.Instance.CreateTextGraphicElement(
        layout, TextType.RectangleParagraph, poly, sym, text, "Polygon Paragraph");
    
      //(Optionally) Modify paragraph border 
      CIMGraphic polyTxtGra = polyTxtElm.GetGraphic();
      CIMParagraphTextGraphic cimPolyTxtGra = polyTxtGra as CIMParagraphTextGraphic;
      cimPolyTxtGra.Frame.BorderSymbol = new CIMSymbolReference();
      cimPolyTxtGra.Frame.BorderSymbol.Symbol =
                   SymbolFactory.Instance.ConstructLineSymbol(
                              ColorFactory.Instance.GreyRGB, 1.0, SimpleLineStyle.Solid);
      polyTxtElm.SetGraphic(polyTxtGra);
    }
    Inheritance Hierarchy

    System.Object
       ArcGIS.Core.CIM.CIMObject
          ArcGIS.Core.CIM.CIMGraphicFrame

    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also