ArcGIS for Desktop

  • Documentation
  • Pricing
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS for Desktop

A complete professional GIS

ArcGIS for Server

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Pricing
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

Set Layer Representation

  • Summary
  • Usage
  • Syntax
  • Code Sample
  • Environments
  • Licensing Information

Summary

Sets a representation for a feature layer. The layer is temporary and stored in memory during the ArcGIS session, available for use in models and scripts.

Usage

  • The input must be a geodatabase feature class with at least one feature class representation.

  • The resulting layer can be used as a valid input for cartographic tools that require a layer input in especially in models and scripts.

  • The temporary feature layer can be saved as a layer file using the Save To Layer File tool or saved as a new feature class using the Copy Features tool. Layers created in ArcCatalog cannot be used in ArcMap unless they are saved to a layer file using the Save To Layer File tool.

Syntax

SetLayerRepresentation_cartography (in_layer, representation)
ParameterExplanationData Type
in_layer

The input feature layer containing at least one representation.

Layer
representation

The representation to be set for the input feature layer.

String

Code Sample

SetLayerRepresentation tool Example (Python Window)

The following Python window script demonstrates how to use the SetLayerRepresentation tool in immediate mode.

import arcpy
from arcpy import env
env.workspace = "C:/data"
arcpy.SetLayerRepresentation_cartography("footprints.lyr", "buildings_Rep")
SetLayerRepresentation tool Example (stand-alone Python script)

This stand-alone script shows an example of using the SetLayerRepresentation tool.

# Name: SetLayerRepresentation_standalone_script.py
# Description: Sets a representation for a feature layer. The layer is temporary and stored in memory for use in models and scripts.
# Author: ESRI
 
# Import system modules
import arcpy
from arcpy import env

# Set environment settings
env.workspace = "C:/data"

# Set local variables
in_features = "footprints.lyr"
representation = "buildings_Rep"

# Execute Set Layer Representation
arcpy.SetLayerRepresentation_cartography(in_features, representation)

Environments

This tool does not use any geoprocessing environments

Licensing Information

  • ArcGIS for Desktop Basic: No
  • ArcGIS for Desktop Standard: Yes
  • ArcGIS for Desktop Advanced: Yes

Related Topics

  • An overview of the Representation Management toolset
Feedback on this topic?

ArcGIS for Desktop

  • Home
  • Documentation
  • Pricing
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS for Desktop
  • ArcGIS for Server
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacy | Legal