Private Sub ApplySimpleRenderer(SomeLayer As IGeoFeatureLayer) Dim pSRenderer As ISimpleRenderer Set pSRenderer = New SimpleRenderer Dim pFillSymbol As ISimpleFillSymbol Set pFillSymbol = New SimpleFillSymbol pFillSymbol.Style = esriSFSForwardDiagonal Dim pColor As IRgbColor Set pColor = New RgbColor pColor.RGB = vbBlue pFillSymbol.Color = pColor 'Property put by reference, must use "Set" Set pSRenderer.Symbol = pFillSymbol pSRenderer.Label = "USA" 'Set the layer’s renderer, also property put by reference Set SomeLayer.Renderer = pSRenderer Dim pMxDoc As IMxDocument Set pMxDoc = ThisDocument pMxDoc.UpdateContents 'Update legend pMxDoc.ActiveView.Refresh 'Redraw display End Sub
9,052 вопросов
30,234 ответов
439 комментариев
2,254 пользователей