摘要
为要素图层设置制图表达。要素图层是临时图层,在 ArcGIS 会话期间存储在内存中,它可在模型和脚本中使用。
用法
语法
SetLayerRepresentation_cartography (in_layer, representation)
参数 | 说明 | 数据类型 |
in_layer | 包含至少一个制图表达的输入要素图层。 | Layer |
representation | 要为输入要素图层设置的制图表达。 | String |
代码实例
SetLayerRepresentation 工具示例(Python 窗口)
以下 Python 窗口脚本演示了如何在立即模式下使用 SetLayerRepresentation 工具。
import arcpy from arcpy import env env.workspace = "C:/data" arcpy.SetLayerRepresentation_cartography("footprints.lyr", "buildings_Rep")
SetLayerRepresentation 工具示例(独立 Python 脚本)
此独立脚本显示的是使用 SetLayerRepresentation 工具的示例。
# 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)
环境
此工具不使用任何地理处理环境
许可信息
- ArcGIS for Desktop Basic: 否
- ArcGIS for Desktop Standard: 是
- ArcGIS for Desktop Advanced: 是