ESRI Prepare Data Exchange Upload File
Introduction
This document outlines the steps to implementing a toolbox script in ArcGIS that exports the spatial data in a format suitable for upload to Assetic via Data Exchange as described in the Assetic Knowledge Base article Bulk Create/Update Spatial Data
Prerequisites
- ArcGIS Pro/ ArcMap
- Layer with an attribute field containing the Assetic asset ID (or a field containing a unique identifier that can be used in post processing to obtain the Assetic asset ID).
- The python script that runs the export:The file can be saved anywhere provided ArcGIS can access it. If the link opens in a browser rather than as a download then right click in the browser window and choose ‘Save As’.
Setup
Create a new toolbox (or use existing)
In the Catalog view right click on ‘Toolboxes” and select “New Toolbox”:
Add a new script to the toolbox
Right click on the toolbox and choose “New” and then choose “Script”:
Provide:
- a name for the script (no special characters permitted)
- Label – this is the name of the tool presented in the toolbox
- Script File – The downloaded file “Assetic.ExportMapToWKT.py”.
Define Parameters
Define the label for each parameter. This label is the description of the parameter that will be presented when running the tool. The value of the label is not important. The order of the labels is critical. The parameters in order are:
- Asset ID Field
- Type: String
- Direction: Input
- This is the name of the field in the layer attribute table containing the unique ID
- Output Folder
- Type: Folder
- Direction: Input
- This is the folder where the Data Exchange CSV files will be saved
Script Execution
The new script will appear in the toolbox with the provided label.
Double click on the toolbox script to open the Geoprocessing dialog that will run the script.
Asset Id Field
Set the field name for the Asset Id (Unique Id) field. Note that the field name needs to be the field name in the attribute table and not the field alias (which may differ if explicitly aliased).
If some layers have a different name for the Asset ID field then turn off the layers (toggle visibility, no need to remove the layers from the map) that have a different name. Those layers will not be processed.
Folder
Use the folder icon to choose an output file location to save the generated Data Exchange CSV files.
Run the export
When ready, run the export via the ‘Run’ button
Check the message windows for results/errors.