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...

Add Representation

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

Summary

Adds a feature class representation to a geodatabase feature class.

Usage

  • The input must be a geodatabase feature class.

  • Two new fields with the specified field names will be appended to the input feature class attribute table to identify the representation rules that govern how each category of features will be portrayed, and to hold any feature-specific overrides to these rules.

  • Specify an import rule layer to import symbol choices listed under the renderer type (i.e., Categories-Unique values) specified on the layer file. All of the symbol choices will be copied into this feature class representation as new representation rules. If an import rule layer is not specified, all features will be assigned to a single default representation rule.

  • If the import rule layer has the same source feature class as the input feature class, you can use the Assign Rule IDs parameter to assign representation rules to features to match the RuleID assignments of the import rule layer.

  • If an import rule layer is specified and the Assign Rule IDs parameter is set to ASSIGN, all features will be assigned to a representation rule based on the symbol choices listed under the renderer type (i.e., Categories-Unique values) specified on the layer file. If an import rule layer is specified, but the Assign Rule IDs parameter is set to NO_ASSIGN, all features will be assigned to a single default representation rule.

  • If <all other values> is used to symbolize features in the input layer, that symbol will become Rule ID 1 when a representation is added.

Syntax

AddRepresentation_cartography (in_features, representation_name, {rule_id_field_name}, {override_field_name}, {geometry_editing_option}, {import_rule_layer}, {assign_rule_id_option})
ParameterExplanationData Type
in_features

The input geodatabase feature class to which a new feature class representation will be added.

Feature Layer
representation_name

The name of the feature class representation to be added.

String
rule_id_field_name
(Optional)

The name of the RuleID field, which will hold a reference to the representation rule for each feature.

String
override_field_name
(Optional)

The name of the Override field, which will hold overrides to representation rules for each feature.

String
geometry_editing_option
(Optional)

Specifies what will happen to the supporting feature class geometry when features are modified with the representation editing tools.

  • STORE_CHANGE_AS_OVERRIDE —Geometry modification made to features with the representation editing tools or using any of the geoprocessing tools in the Cartography toolbox will be stored as shape overrides in the Override field. Supporting feature class geometry (stored in the Shape field of the feature class) will be unaffected. This is the default.
  • MODIFY_FEATURE_SHAPE —Geometry modifications made to features with the representation editing tools, or using any of the geoprocessing tools in the Cartography toolbox, will modify the supporting feature class geometry (stored in the Shape field of the feature class.) No shape overrides will be stored.
String
import_rule_layer
(Optional)

A feature layer that symbolizes features with a feature class representation, from which the representation rules are imported.

Layer
assign_rule_id_option
(Optional)

Specifies whether or not to assign representation rules to features to match the RuleID assignments of the import rule layer. This option applies only when Import Rule Layer is specified.

  • ASSIGN —assign RuleIDs to features to match the import rule layer. This is the default.
  • NO_ASSIGN —Specifies not to match RuleIDs to features from the import rule layer. Features will be assigned to the default representation rule instead.
String

Code Sample

AddRepresentation tool Example (Python Window)

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

import arcpy
from arcpy import env
env.workspace = "C:/data"
arcpy.AddRepresentation_cartography("C:/data/cartography.gdb/buildings/footprints",
                                    "footprints_Rep", "RuleID", "Override",
                                    "STORE_CHANGE_AS_OVERRIDE", "C:/data/footprints.lyr", "ASSIGN")
AddRepresentation tool Example (stand-alone Python script)

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

# Name: AddRepresentation_standalone_script.py
# Description: Adds a feature class representation
#              to a geodatabase feature class.
 
# Import system modules
import arcpy
from arcpy import env

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

# Set local variables
in_features = "C:/data/cartography.gdb/buildings/footprints"
representation_name = "footprints_Rep"
rule_id_field_name = "RuleID"
override_field_name = "Override"
geometry_editing_option = "STORE_CHANGE_AS_OVERRIDE"
import_rule_layer = "C:/data/footprints.lyr"
assign_rule_id_option = "ASSIGN"

# Execute Add Representation
arcpy.AddRepresentation_cartography(in_features,
                                    representation_name,
                                    rule_id_field_name,
                                    override_field_name,
                                    geometry_editing_option,
                                    import_rule_layer,
                                    assign_rule_id_option)

Environments

  • Cartographic Coordinate System
  • Reference Scale

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
  • Calculate Representation Rule
  • Drop Representation
  • Set Layer Representation
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