Calculate Layer Snapshot (Production Mapping)

Résumé

Calculates a snapshot of a feature layer by creating a snapshot value of feature geometry, extent, and symbology. The tool stores the snapshot value in a long integer field in the Input Features feature class. The Compare Layer To Snapshot tool uses the snapshot value to identify changes to geometry, extent, and symbology in a layer across multiple map documents.

The tool can optionally populate metadata including date and time, user name, reference scale, and an historical string. Metadata is also written to the Input Features feature class.

Usage

Syntaxe

CalculateLayerSnapshot_production (input_features, extent_field_name, {hist_string}, {history_field_name}, {date_field_name}, {username_field_name}, {output_workspace}, reference_scale, {refscale_field_name}, {fc_suffix}, {output_Layers})
ParamètreExplicationType de donnée
input_features
[input_features,...]

List of feature layers to populate with snapshot information.

Feature Layer
extent_field_name

The name of the field that will store the snapshot value. The field type must be LONG.

Field
hist_string
(Facultatif)

The tool will insert any dataset in hist_string into the history_field_name field. Use to define a custom historical note.

String
history_field_name
(Facultatif)

The name of the field that will store the historical string. The field type must be TEXT.

Field
date_field_name
(Facultatif)

The name of the field that will store date and time values. The field type must be DATE.

Field
username_field_name
(Facultatif)

The name of the field that will store a user name. The field type must be TEXT.

Field
output_workspace
(Facultatif)

The workspace that will store the output of Feature Outline Masks. This parameter requires that you set reference_scale and refscale_field_name.

Workspace
reference_scale

The scale in which a symbol appears at its true size. The Feature Outline Masks tool uses reference scale to calculate masking geometry. This parameter requires that you set output_workspace first.

Double
refscale_field_name
(Facultatif)

The name of the field that will store the reference_scale value. The tool creates this field in the output feature class created by Feature Outline Masks . This parameter requires that you set output_workspace first.

String
fc_suffix
(Facultatif)

The suffix that will be appended to the feature layer name specified in input_features. The suffix defaults to _LayerSnapshot.

String
output_Layers
(Facultatif)

Output feature layers created by Feature Outline Masks.

Table View

Exemple de code

CalculateLayerSnaptshot example 1 (Stand–alone Python script)

This stand-alone script demonstrates how to use CalculateLayerSnapshot. This script references the PipeL feature class in the SoCal_Sample.gdb geodatabase. This geodatabase is included with the Production Mapping sample data.

# Name: CalculateLayerSnapshot_Standalone.py
# Description: 
# Author: ESRI
# Date: March 2010

import arcpy

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

# Use the PipesL feature class from the Production Mapping sample data
PipesL = r'C:\data\Foundation_Data_Tutorials\ProductLibrary\GDB\SoCal_Sample.gdb\PipeL'

# CalculateLayerSnapshot tool requires a feature layer
arcpy.MakeFeatureLayer(PipesL,"PipesLyr")

# import the toolbox
arcpy.ImportToolbox(r"C:\Program Files\ArcGIS\Desktop10.0\ArcToolbox\Toolboxes\Production Mapping Tools.tbx")

# exec the tool
arcpy.CalculateLayerSnapshot_production("PipesLyr","snapshotkey")

# check the extension in
arcpy.CheckInExtension("Foundation")
CalculateLayerSnaptshot example 2 (Python window)

The following ArcGIS Python window script demonstrates how to use the CalculateLayerSnapshot function with all parameters. This script references the BuiltupP feature class in the SoCal.gdb geodatabase. This geodatabase is included with the Production Mapping sample data. Run the script from the Python window of ArcCatalog or ArcMap.

arcpy.MakeFeatureLayer_management(r'C:\data\Foundation_Data_Tutorials\ProductLibrary\GDB\SoCal_Sample.gdb\BuiltupP',"BuiltupP")
arcpy.AddField_management("BuiltupP","snapshotkey","LONG")
arcpy.AddField_management("BuiltupP","history","TEXT")
arcpy.AddField_management("BuiltupP","date_time","DATE")
arcpy.AddField_management("BuiltupP","username","TEXT")
arcpy.CreateFileGDB_management("c:/data","outExtents.gdb")
arcpy.ImportToolbox(r"C:\Program Files\ArcGIS\Desktop10.0\ArcToolbox\Toolboxes\Production Mapping Tools.tbx")
arcpy.CalculateLayerSnapshot_production("BuiltupP","snapshotkey","Calculate layer snapshot for BuiltupP","history","date_time","username","c:/data/outExtents.gdb",12000,"refscale","builtupP_snapshot")

Environnements

Cet outil ne fait appel à aucun environnement de traitement de données géographiques

Rubriques associées

Informations de licence

ArcView : RequiertProduction Mapping
ArcEditor : RequiertProduction Mapping
ArcInfo : RequiertProduction Mapping

9/30/2010