【C009】ArcGIS VBA - 学习

改变点要素符号和颜色:

Sub sdkjflsdjfldj()

    Dim pColor As IRgbColor

    Set pColor = New RgbColor

    pColor.Red = 255

    pColor.Green = 100

    pColor.Blue = 100



    Dim fnt As New StdFont

    fnt.name = "ESRI Crime analysis"

    

    Dim pMarkerSym As ICharacterMarkerSymbol

    Set pMarkerSym = New CharacterMarkerSymbol

    pMarkerSym.Font = fnt

    pMarkerSym.CharacterIndex = 59

    pMarkerSym.size = 15

    pMarkerSym.Color = pColor

    

    Dim pRenderer As ISimpleRenderer

    Set pRenderer = New SimpleRenderer

    Set pRenderer.Symbol = pMarkerSym

    

    Dim pMxDoc As IMxDocument

    Dim pMap As IMap

    Dim pGFLayer As IGeoFeatureLayer

    Set pMxDoc = ThisDocument

    Set pMap = pMxDoc.FocusMap

    Set pGFLayer = pMap.Layer(0)

    Set pGFLayer.Renderer = pRenderer

    pMxDoc.activeView.Refresh

End Sub







你可能感兴趣的:(arcgis)