Apply View (Production Mapping)

汇总

Applies view settings, created by Production Mapping views tools, to a map document.

用法

语法

ApplyView_production (input_document, input_dataframe, input_views_table_location, input_view, {input_views_source_workspace})
参数说明数据类型
input_document

The path to and name of the map document (MXD) file to which you want to apply the view.

File
input_dataframe

The data frame to which you want to apply the view. Views can only be applied to one data frame at a time.

String
input_views_table_location

The path to the geodatabase that contains the views table. The table can be stored in a personal, file, or enterprise geodatabase.

Workspace
input_view

The name of the view you want to apply to the selected data frame.

String
input_views_source_workspace
(可选)

The workspace in which one or more feature layers can be matched to a data source. This workspace is used when applying a view results in breaking the link between the feature layers and the data source.

Workspace

代码示例

ApplyView Example (Stand-alone Python Script)

The following stand-alone Python script shows how to use the ApplyView function.

# Name: ApplyView.py
# Description: Applies a production mapping view to a document
# Author: ESRI
# Date: April 2010

# Import arcpy module
import arcpy

# check out a production mapping extension license
arcpy.CheckOutExtension("Foundation")

# Local variables: workspace containing the views table and the target mxd
views_gdb = "C:\\data\\views.gdb"
socal_utm_map_mxd = "C:\\data\\socal_utm_map.mxd"

# import the production mapping toolbox - you may have to alter this path
arcpy.ImportToolbox('C:/Program Files/ArcGIS/Desktop10.0/ArcToolbox/Toolboxes/Production Mapping Tools.tbx')

# Apply View "SummitView" to the mxd. 
arcpy.ApplyView_production(socal_utm_map_mxd, "Layers", views_gdb, "SummitView :: View of Route at San G Summit", "")

# check in the production mapping extension
arcpy.CheckInExtension("Foundation")

环境

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

相关主题

许可信息

ArcView: 需要 Production Mapping
ArcEditor: 需要 Production Mapping
ArcInfo: 需要 Production Mapping

9/30/2010