Skip to content

Scripted layer creation in ArcGIS Pro using ArcPy and layer definition JSON.

Notifications You must be signed in to change notification settings

chazgorman/ArcGISProCreateLayers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project includes a python script that can be run in the ArcGIS Pro python window to generate layers based on layer definitions defined in JSON.

Script uses ArcGIS Pro ArcPy SDK: http://pro.arcgis.com/en/pro-app/arcpy/main/arcgis-pro-arcpy-reference.htm

From the layer definition JSON, the script generates:

  • Field domains, both CODED and RANGE
  • Feature class layers
  • Fields for feature class layers
  • Editor tracking on layers
  • Layer symbology for 'Simple Renderer' and for single group 'Unique Value Renderer'
  • Layer aliases

Usage:

  1. Create a new ArcGIS Pro Project
  2. Add a map to the project, keeping the default name of 'Map'
  3. Update layer definition JSON file location in code: layer_file = open("C:\yourdir\LayerDefinition.json", "r")
  4. From the Python window in ArcGIS Pro, right-click and select "Load Code"
  5. Navigate to and select your ArcGISPro_CreateLayers.py script
  6. In the ArcGIS Pro python window, ensure the cursor is at the very end of the script
  7. Press Enter three times to run the script
  8. Sit back and relax

Alt text

About

Scripted layer creation in ArcGIS Pro using ArcPy and layer definition JSON.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages