Summary
Appends event records from a table, layer, or feature class into an existing event feature class.
Usage
The Input Event can be a table, layer, or feature class.
This tool supports both point and polyline features. The feature type in the input and target event parameters should match.
For more information about the fields required in event feature classes, see the Events Data Model.
If the Generate EventID GUIDs for loaded events option is checked and you want GUIDs generated, you should either not map the EventID field in the field mapping section or have Null records in the EventID column in the source event data. If the EventID field in a source event record is populated and the Generate EventID GUIDs for loaded events option is checked, the value in the source event record EventID field will be loaded into the target event.
Syntax
AppendEvents_locref (in_dataset, in_target_event, field_mapping, {load_type}, {generate_event_ids}, {generate_shapes})
Parameter | Explanation | Data Type |
in_dataset | The source event records to append. | Table View |
in_target_event | The event layer or feature class into which the source event records append. | Feature Layer |
field_mapping | Controls how the attribute information in the fields of the in_dataset is transferred to the in_target_event. Because the data of the in_dataset is appended into an existing event that has a predefined schema (field definitions), fields cannot be added or removed from the target dataset. While you can set merge rules for each output field, the tool ignores those rules. The ArcPy FieldMappings class can be used to define this parameter. | Field Mappings |
load_type (Optional) | Determines how appended events with measure or temporality overlaps with identical Event IDs as Target Event records are loaded into the event feature class.
| String |
generate_event_ids (Optional) | Indicates whether to generate Event IDs for in_dataset records being appended. Generation of Events IDs will only be applied to in_dataset records with a Null value for the Event ID field.
| Boolean |
generate_shapes (Optional) | Indicates whether to regenerate the shapes for the records being appended. This parameter is only active when the in_dataset is a feature layer or feature class.
| Boolean |
Code sample
AppendEvents example 1 (Python window)
Demonstrates how to use the AppendEvents tool in the Python window.
# tool variables
in_dataset = "AdditionalDOTClass"
in_event_featureclass = "P_DOTClass"
in_fields = ""
load_type = "ADD"
event_ids = "GENERATE_EVENT_IDS"
generate_shapes = "GENERATE_SHAPES"
# set current workspace
arcpy.env.workspace="C:/Data/UPDM.gdb"
# execute the tool
arcpy.AppendEvents_locref(in_dataset, in_event_featureclass, in_fields, load_type, event_ids, generate_shapes)
AppendEvents example 2 (stand-alone script)
Demonstrates how to use the AppendEvents tool as a stand-alone Python script.
# Name: AppendEvents_standalone.py
# Description: Append records into an existing Pipeline Referencing event feature class.
# Requires: ArcGIS Pipeline Referencing
# Import arcpy module
import arcpy
# Check out any necessary licenses
arcpy.CheckOutExtension("LocationReferencing")
# Local variables:
AdditionalDOTClass = "C:\\Data\\UPDM.gdb\\AdditionalDOTClass"
DOTClass = "C:\\Data\\NY_Data.gdb\\P_Integrity\\P_DOTClass"
# Process: Append Events
arcpy.AppendEvents_locref(AdditionalDOTClass, DOTClass, "", "RETIRE_OVERLAPS", "NO_GENERATE_EVENT_IDS", "GENERATE_SHAPES")
Environments
Licensing information
- ArcGIS Desktop Basic: Requires ArcGIS Pipeline Referencing
- ArcGIS Desktop Standard: Requires ArcGIS Pipeline Referencing
- ArcGIS Desktop Advanced: Requires ArcGIS Pipeline Referencing