计算制图表达规则 (制图)

许可等级:BasicStandardAdvanced

摘要

通过计算 RuleID 字段将现有制图表达规则应用到要素类制图表达中的要素。

用法

语法

CalculateRepresentationRule_cartography (in_features, representation, representation_rule)
参数说明数据类型
in_features

该要素类包含将要计算制图表达规则的要素。

Feature Layer
representation

该要素类制图表达包含将应用到要素的制图表达规则。该要素类制图表达必须属于输入要素类。

String
representation_rule

将通过计算 RuleID 字段而应用到输入要素的制图表达规则。

String

代码实例

CalculateRepresentationRule 工具示例(Python 窗口)

以下 Python 窗口脚本演示了如何在即时模式下使用 CalculateRepresentationRule 工具。

import arcpy
from arcpy import env
env.workspace = "C:/data"
arcpy.CalculateRepresentationRule_cartography("footprints.lyr", "footprints_Rep", "Rule_3")
CalculateRepresentationRule 工具示例(独立 Python 脚本)

此独立脚本显示的是使用 CalculateRepresentationRule 工具的示例。

# 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)

环境

此工具不使用任何地理处理环境

相关主题

许可信息

ArcGIS for Desktop Basic:否
ArcGIS for Desktop Standard:是
ArcGIS for Desktop Advanced:是
9/15/2013