Apply Symbology From Layer (Data Management)


This tool applies the symbology from a layer to the Input Layer. It can be applied to feature, raster, network analysis, TIN, and geostatistical layer files or layers in the ArcMap table of contents. This tool is primarily for use in scripts or ModelBuilder.


The Apply Symbology From Layer tool



ApplySymbologyFromLayer_management (in_layer, in_symbology_layer)
ParameterExplanationData Type

The layer to which the symbology will be applied.

Feature Layer;Raster Layer; TIN Layer;Network Analysis Layer;Geostatistical Layer

The symbology of this layer is applied to the Input Layer.

Feature Layer; Raster Layer;TIN Layer; Network Analysis Layer;Geostatistical Layer

Code Sample

ApplySymbologyFromLayer Example 1 (Python Window)

The following Python window script demonstrates how to use the ApplySymbologyFromLayer function in immediate mode.

import arcpy
arcpy.ApplySymbologyFromLayer_management("sf_points", "sf_points_water.lyr")
ApplySymbologyFromLayer Example 2 (Stand-alone Script)

The following stand-alone script shows how to use the ApplySymbologyFromLayer function in scripting.

# Name:
# Purpose: apply the symbology from one layer to another

# Import system modules
import arcpy
from arcpy import env

# Set the current workspace
env.workspace = "C:/data"

# Set layer to apply symbology to
inputLayer = "sf_points.lyr"

# Set layer that output symbology will be based on
symbologyLayer = "water_symbols_pnt.lyr"

# Apply the symbology from the symbology layer to the input layer
arcpy.ApplySymbologyFromLayer_management (inputLayer, symbologyLayer)


Related Topics

Licensing Information

ArcView: Yes
ArcEditor: Yes
ArcInfo: Yes