Calculate Visual Specifications (Production Mapping)

License Level:BasicStandardAdvanced

Summary

Production configuration tool that applies representation symbology as well as calculates label fields for multiple layers.

This tool uses relational queries to apply symbology to many layers and to calculate field values and in doing so, links feature attributes to representation rules and label expressions. This provides a single production workflow to create and maintain symbology and text.

Usage

Syntax

CalculateVisualSpecifications_production (in_features, vs_workspace, specifications, render_representations, display_labels, preserve_free_representations)
ParameterExplanationData Type
in_features
[in_features,...]

The feature layers, feature classes, or tables to which you want to apply the visual specifications.

Table View
vs_workspace

The location of the workspace that contains the visual specifications table (VST_Specification). This table can be stored in a personal, file, or enterprise geodatabase.

Workspace
specifications
[specifications,...]

The visual specifications you want to apply to the selected feature layers and feature classes.

String
render_representations

Indicates whether calculated representations in in_features are displayed.

  • RENDER_REPRESENTATIONSDisplays calculated representations. This is the default.
  • NO_RENDER_REPRESENTATIONSDoes not display calculated representations.
Boolean
display_labels

Indicates whether calculated fields are displayed as labels.

  • DISPLAY_LABELSDisplays calculated fields as labels. This is the default.
  • NO_DISPLAY_LABELSDoes not display calculated fields as labels.

Boolean
preserve_free_representations

Indicates whether free representations are preserved.

  • PRESERVEThe tool will not overwrite free representations within any features. This is the default.
  • NO_PRESERVEThe tool will overwrite free representations within any features.

Boolean

Code Sample

CalculateVisualSpecifications example (Python window)

The following Python window script demonstrates how to use the CalculateVisualSpecifications tool.

# set two workspaces - one for the feature layer and another for vst
arcpy.env.workspace=r'C:\gisdata\TutorialsSamples\Tutorials\Cartography\Austin.gdb'
vst_workspace=r'C:\gisdata\TutorialsSamples\Tutorials\Cartography\ProductLibrary.gdb'

# make a feature layer and add it to the display
arcpy.MakeFeatureLayer_management(r'LandUse\WoodyA','Woods')

# NOTE: The comma delimited visual specification string may not display correctly in the dropdown list in the python window.
# You can copy the complete visual specification string from the Visual Specifications tool on the Production Symbology toolbar.
arcpy.CalculateVisualSpecifications_production("Woods",vst_workspace,"TopoMap 1:24,000 :: TopoMap 1:24,000 Specification","RENDER_REPRESENTATIONS","DISPLAY_LABELS","NO_PRESERVE")
CalculateVisualSpecifications example 2 (stand-alone script)

This stand-alone script demonstrates how to use the CalculateVisualSpecifications tool.

# CalcVisualSpec.py
# Description: Executes Calculate Visual Specifications tool

# Import arcpy module
import arcinfo
import arcpy

# check out a foundation license
arcpy.CheckOutExtension("Foundation")

# vst workspace variable
vs_workspace = r'C:\student\PS_Carto\Database\WilsonPL.gdb'

# make two feature layers for the calc vst process
arcpy.MakeFeatureLayer_management(r'C:\student\PS_Carto\Database\Wilson.gdb\Transportation\Streets', 'streets_vst')
arcpy.MakeFeatureLayer_management(r'C:\student\PS_Carto\Database\Wilson.gdb\Utility\Gaslines', 'gaslines_vst')

# create a list of the two feature layers
features = ['streets_vst','gaslines_vst']

# exec Calculate Visual Specifications
arcpy.CalculateVisualSpecifications_production(features, vs_workspace, "Carto_Streets :: Cartographic represenation of streets", "RENDER_REPRESENTATIONS","NO_DISPLAY_LABELS","NO_PRESERVE")

# print the messages to the console
print arcpy.GetMessages()

arcpy.CheckInExtension("Foundation")

Environments

Related Topics

Licensing Information

ArcGIS for Desktop Basic: No
ArcGIS for Desktop Standard: Requires Production Mapping
ArcGIS for Desktop Advanced: Requires Production Mapping
12/18/2014