ArcGIS Pro 3.8 API Reference Guide
ArcGIS.Core.CIM Namespace / CIMMaplexDictionaryEntry Class / Text Property
Example

In This Topic
    Text Property (CIMMaplexDictionaryEntry)
    In This Topic
    Gets or sets the text to abbreviate.
    Syntax
    public string Text {get; set;}
    Public Property Text As String
    Example
    Create Abbreviation Dictionary in the Map Definition to a layer
    {
      await QueuedTask.Run(() =>
      {
      //Get the map's definition
      var mapDefn = map.GetDefinition();
      //Get the Map's Maplex labelling engine properties
      var mapDefnPlacementProps = mapDefn.GeneralPlacementProperties as CIMMaplexGeneralPlacementProperties;
    
      //Define the abbreviations we need in an array
      List<CIMMaplexDictionaryEntry> abbreviationDictionary = new List<CIMMaplexDictionaryEntry>
          {
              new CIMMaplexDictionaryEntry {
              Abbreviation = "Hts",
              Text = "Heights",
              MaplexAbbreviationType = MaplexAbbreviationType.Ending
    
           },
              new CIMMaplexDictionaryEntry
              {
                  Abbreviation = "Ct",
                  Text = "Text",
                  MaplexAbbreviationType = MaplexAbbreviationType.Ending
    
              }
              //etc
          };
      //The Maplex Dictionary - can hold multiple Abbreviation collections
      var maplexDictionary = new List<CIMMaplexDictionary>
          {
              new CIMMaplexDictionary {
                  Name = "NameEndingsAbbreviations",
                  MaplexDictionary = abbreviationDictionary.ToArray()
              }
    
          };
      //Set the Maplex Label Engine Dictionary property to the Maplex Dictionary collection created above.
      mapDefnPlacementProps.Dictionaries = maplexDictionary.ToArray();
      //Set the Map definition
      map.SetDefinition(mapDefn);
      });
    }
    Requirements

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

    ArcGIS Pro version: 3.0 or higher.
    See Also