ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Core.CIM Namespace / CIMStringMap Class
Members Example

In This Topic
    CIMStringMap Class
    In This Topic
    Represents a string map of key value pairs.
    Object Model
    CIMStringMap ClassCIMStringMap ClassCIMStringMap Class
    Syntax
    Example
    Create Point Element
    //Must be on QueuedTask.Run(() => { ...
    
    //Build geometry
    Coordinate2D coord2D = new Coordinate2D(2.0, 10.0);
    
    //Reference a point symbol in a style
    StyleProjectItem stylePrjItm = Project.Current.GetItems<StyleProjectItem>()
             .FirstOrDefault(item => item.Name == "ArcGIS 2D");
    SymbolStyleItem symStyleItm = stylePrjItm.SearchSymbols(
                          StyleItemType.PointSymbol, "City Hall")[0];
    CIMPointSymbol pointSym = symStyleItm.Symbol as CIMPointSymbol;
    pointSym.SetSize(50);
    
    var elemInfo = new ElementInfo()
    {
      CustomProperties = new List<CIMStringMap>() {
         new CIMStringMap() { Key = "Key1", Value = "Value1"},
         new CIMStringMap() { Key = "Key2", Value = "Value2"}
       },
      Anchor = Anchor.TopRightCorner,
      Rotation = 45.0
    };
    
    var graphic = GraphicFactory.Instance.CreateSimpleGraphic(
                                  coord2D.ToMapPoint(), pointSym);
    
    ElementFactory.Instance.CreateGraphicElement(
      container, graphic, "New Point", true, elemInfo);
    
    Inheritance Hierarchy

    System.Object
       ArcGIS.Core.CIM.CIMObject
          ArcGIS.Core.CIM.CIMStringMap

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also