ArcGIS Desktop

  • Documentation
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

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
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

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 Desktop Basic: No
  • ArcGIS Desktop Standard: Yes
  • ArcGIS Desktop Advanced: Yes

Related topics

  • An overview of the Representation Management toolset

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS Platform

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

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2019 Esri. | Privacy | Legal