Apply View (Production Mapping)

Summary

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

Usage

Syntax

ApplyView_production (input_document, input_dataframe, input_views_table_location, input_view, {input_views_source_workspace})
ParameterExplanationData Type
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
(Optional)

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

Code Sample

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

Environments

This tool does not use any geoprocessing environments

Related Topics

Licensing Information

ArcView: No
ArcEditor: Requires Production Mapping
ArcInfo: Requires Production Mapping

5/4/2011