Public Sub Symbolize() ' Get Layer Dim pMXDoc As IMxDocument Set pMXDoc = ThisDocument Dim pMap As IMap Set pMap = pMXDoc.FocusMap Dim pLayer As ILayer Set pLayer = pMap.Layer(0) Dim pGeoFeatureLayer As IGeoFeatureLayer Set pGeoFeatureLayer = pLayer ' Create a Font Dim pFontDisp As IFontDisp Set pFontDisp = New stdole.StdFont pFontDisp.Bold = True pFontDisp.Name = "ESRI Default Marker" ' Create a character Dim pCharacterMarkerSymbol As ICharacterMarkerSymbol Set pCharacterMarkerSymbol = New CharacterMarkerSymbol With pCharacterMarkerSymbol .size = 8 .Angle = 0 .Font = pFontDisp .CharacterIndex = 35 ' This is Triangle 1 End With ' Update renderer, this assumes the renderer is a single feature Dim pSimpleRenderer As ISimpleRenderer Set pSimpleRenderer = pGeoFeatureLayer.Renderer Set pSimpleRenderer.Symbol = pCharacterMarkerSymbol Set pGeoFeatureLayer.Renderer = pSimpleRenderer ' Refresh document pMXDoc.UpdateContents pMXDoc.ActiveView.Refresh End Sub
/// To find what character index you need for a particular font:
/// 1. Open ArcMap
/// 2. Add in any point dataset
/// 3. Double click on a point symbol in the TOC
/// 4. In the Symbol Selector dialog, click the properties button
/// 5. In the Symbol Property Editor dialog, change the Type to 'Character Marker Symbol'
/// 6. Choose the desired Font
/// 7. Click on the different character symbols to see what Unicode index numer you need