Sub RendererLayer()
Dim pMxDoc As IMxDocument
Dim pMap As IMap
Dim pLayer As ILayer
Dim pCharMarker As ICharacterMarkerSymbol
Set pMxDoc = m_pApp.Document
Set pMap = pMxDoc.FocusMap
Set pLayer = pMap.Layer("Слой")
Dim pFont As New stdole.StdFont
pFont.Name = "ESRI Default Marker"
Dim pCBR As IClassBreaksRenderer
Set pCBR = New ClassBreaksRenderer
pCBR.Field = "Поле"
pCBR.BreakCount = 3
pCBR.Break(0) = 1 'код в поле
pCBR.Break(1) = 2 'код в поле
pCBR.Break(2) = 3 'код в поле
pCBR.Label(0) = "Excess"
pCBR.Label(1) = "Normal"
pCBR.Label(2) = "Not data"
Set pCharMarker = New CharacterMarkerSymbol
With pCharMarker
.Size = 10
.Color = GetRGBColor(0, 255, 0)
.Font = pFont
.CharacterIndex = 33
End With
Set pSym1 = pCharMarker
Set pCharMarker = New CharacterMarkerSymbol
With pCharMarker
.Size = 10
.Color = GetRGBColor(255, 0, 0)
.Font = pFont
.CharacterIndex = 33
End With
Set pSym = pCharMarker
Set pCharMarker = New CharacterMarkerSymbol
With pCharMarker
.Size = 10
.Color = GetRGBColor(0, 0, 0)
.Font = pFont
.CharacterIndex = 33
End With
Set pSym2 = pCharMarker
pCBR.Symbol(0) = pSym
pCBR.Symbol(1) = pSym1
pCBR.Symbol(2) = pSym2
Dim pGFLayer As IGeoFeatureLayer
Set pGFLayer = pLayer
Set pGFLayer.Renderer = pCBR
pMxDoc.ActiveView.Refresh
pMxDoc.UpdateContents
End Sub