Tag Archives: import

ArcGIS VBA Import Symbology to Multiple Layers

Sub CopyRenderer()

Dim pMxDoc As IMxDocument
Dim pMap As IMap
Set pMxDoc = Application.Document
Set pMap = pMxDoc.FocusMap

Dim pFromLayer As IGeoFeatureLayer
Dim pToLayer As IGeoFeatureLayer
Set pFromLayer = pMap.Layer(modCommon.GetLayerIndex(“Line10”))
Dim i As Integer

For i = 30 To 143
If TypeOf pMap.Layer(modCommon.GetLayerIndex(“Line” & i)) Is IGeoFeatureLayer Then
Set pToLayer = pMap.Layer(modCommon.GetLayerIndex(“Line” & i))
Set pToLayer.Renderer = pFromLayer.Renderer
End If
Next

pMxDoc.UpdateContents

End Sub

Advertisements