This document is archived and information here might be outdated.  Recommended version.


How to make a character marker symbol (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > Developing with ArcGIS > Learning ArcObjects > Interacting with and configuring maps, layers, and graphics > Working with symbols and colors > How to make a character marker symbol

How to make a character marker symbol


Summary
This topic shows how to create a character marker line symbol.

Making a character marker symbol

Character marker symbols allow you to use glyph patterns from a font as the symbol for a marker. The glyph can be from a TrueType, OpenType, or PostScript Type-1 font.
Do the following steps to make a character marker symbol:
  1. Define the color.
  2. Define the font.
  3. Set the properties for the character marker symbol.
The following code example shows how to create a marker using the ESRI Default Marker TrueType font:
[VB.NET]
Public Sub CharacterMarkerSymbol()
    
    ' Define the color you want to use.
    Dim rgbColorCls As ESRI.ArcGIS.Display.IRgbColor=New ESRI.ArcGIS.Display.RgbColorClass
    rgbColorCls.Red=255
    rgbColorCls.Green=0
    rgbColorCls.Blue=0
    
    ' Define the font you want to use.
    Dim stdFontCls As stdole.IFontDisp=CType(New stdole.StdFont, stdole.IFontDisp)
    stdFontCls.Name="ESRI Default Marker"
    stdFontCls.Size=24
    
    ' Set the character marker symbol's properties.
    Dim characterMarkerSymbolCls As ESRI.ArcGIS.Display.ICharacterMarkerSymbol=New ESRI.ArcGIS.Display.CharacterMarkerSymbolClass
    With characterMarkerSymbolCls
        .Angle=90
        .CharacterIndex=36
        .Color=rgbColorCls
        .Font=stdFontCls
        .Size=24
        .XOffset=0
        .YOffset=0
    End With
    
End Sub
[C#]
public void CharacterMarkerSymbol()
{
    // Define the color you want to use.
    ESRI.ArcGIS.Display.IRgbColor rgbColorCls=new
        ESRI.ArcGIS.Display.RgbColorClass();
    rgbColorCls.Red=255;
    rgbColorCls.Green=0;
    rgbColorCls.Blue=0;

    // Define the font you want to use.
    stdole.IFontDisp stdFontCls=((stdole.IFontDisp)(new stdole.StdFont()));
    stdFontCls.Name="ESRI Default Marker";
    stdFontCls.Size=24;

    // Set the character marker symbol's properties.
    ESRI.ArcGIS.Display.ICharacterMarkerSymbol characterMarkerSymbolCls=new
        ESRI.ArcGIS.Display.CharacterMarkerSymbolClass();
    characterMarkerSymbolCls.Angle=90;
    characterMarkerSymbolCls.CharacterIndex=36;
    characterMarkerSymbolCls.Color=rgbColorCls;
    characterMarkerSymbolCls.Font=stdFontCls;
    characterMarkerSymbolCls.Size=24;
    characterMarkerSymbolCls.XOffset=0;
    characterMarkerSymbolCls.YOffset=0;
}


See Also:

How to make a cartographic line symbol
How to make a gradient fill symbol
How to make a line callout
How to make a line fill symbol
How to make a picture marker symbol
Creating custom symbols
Creating other kinds of custom symbols
How to make different types of colors and color ramps




Development licensing Deployment licensing
ArcGIS Desktop Basic ArcGIS Desktop Basic
ArcGIS Desktop Standard ArcGIS Desktop Standard
ArcGIS Desktop Advanced ArcGIS Desktop Advanced
Engine Developer Kit Engine