ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

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

Calculate Representation Rule

  • Summary
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

Summary

Applies existing representation rules to features in a feature class representation by calculating the RuleID field.

Usage

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

  • Specify a representation rule to assign to a feature. The selected feature or features will have their Rule ID field populated with the specified rule.

  • If the specified Rule ID matches the current Rule ID for a selected feature or features, there will be no change.

Syntax

arcpy.cartography.CalculateRepresentationRule(in_features, representation, representation_rule)
ParameterExplanationData Type
in_features

The feature class that contains the features for which representation rules will be calculated.

Feature Layer
representation

The feature class representation that contains the representation rules that will be applied to features. This feature class representation must belong to the input feature class.

String
representation_rule

The representation rule to be applied to the input features by calculating the RuleID field.

String

Code sample

CalculateRepresentationRule tool Example (Python Window)

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

import arcpy
from arcpy import env
env.workspace = "C:/data"
arcpy.CalculateRepresentationRule_cartography("footprints.lyr", "footprints_Rep", "Rule_3")
CalculateRepresentationRule tool Example (stand-alone Python script)

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

# Name: CalculateRepresentationRule_standalone_script.py
# Description: Applies existing representation rules to features in a feature class representation by calculating the RuleID field.
# 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 = "footprints_Rep"
representation_rule = "Rule_3"

# Execute Calculate Representation Rule
arcpy.CalculateRepresentationRule_cartography(in_features, representation, representation_rule)

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: No
  • Standard: Yes
  • Advanced: Yes

Related topics

  • An overview of the Representation Management toolset
  • Add Representation
  • Drop Representation
  • Set Layer Representation

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

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