Apply Symbology From Layer (Data Management)

Summary

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.

Illustration

The Apply Symbology From Layer tool

Usage

Syntax

ApplySymbologyFromLayer_management (in_layer, in_symbology_layer)
ParameterExplanationData Type
in_layer

The layer to which the symbology will be applied.

Feature Layer;Raster Layer; TIN Layer;Network Analysis Layer;Geostatistical Layer
in_symbology_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: ApplySym.py
# 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)

Environments

Related Topics

Licensing Information

ArcView: Yes
ArcEditor: Yes
ArcInfo: Yes

10/27/2014