Apply View (Production Mapping)
汇总
Applies view settings, created by Production Mapping views tools, to a map document.
用法
-
The view applied may contain different feature layers than your current map document.
-
The settings configured with the view also affect the way the current map changes when the view is applied.
-
This tool needs to be run for each data frame to which you want to apply a view.
语法
参数 | 说明 | 数据类型 |
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 |
代码示例
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")