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


End Sub

Post a comment or leave a trackback: Trackback URL.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: