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