All Questions
8 questions
0
votes
1
answer
650
views
Adding multiple feature classes (all within file geodatabase) to group layer using ArcPy with ArcGIS Pro
I am currently trying to add all the feature classes contained within a gdb to a group layer in ArcGIS Pro via a script. I have however not managed to add more than one single feature class at a time.
...
1
vote
1
answer
255
views
How to programmatically access Trace network layer results when using NETWORK_LAYERS result type in a stand-alone Python script?
I have a stand-alone Python script that runs a Connected Trace on a Trace Network. This is a re-write of an existing script that runs a trace on a Geometric Network. The script will be published as ...
2
votes
1
answer
208
views
How to move a layer to a group using Python code in ArcGIS Pro?
I am trying to move a layer to a group using python code. Both the layer and the group are in the current/same map in ArcGIS Pro.
I have the following code (the layer to be moved to the group "...
4
votes
1
answer
465
views
Move an existing layer into a group layer using ArcPy in ArcGIS Pro
I have a map object and I am trying to move an existing layer from that map object into a newly created group layer in the same map object.
aprx = arcpy.mp.ArcGISProject("Current")
mp = aprx....
3
votes
1
answer
351
views
Renaming group layer using ArcPy with ArcGIS Pro
How do I rename a group layer in ArcGIS Pro using ArcPy?
In ArcMap I can do so thus:
groupLayer = arcpy.mapping.Layer(r"Path to grouplayer.lyr")# empty group layer as template
groupLayer....
2
votes
1
answer
1k
views
Identifying layers by grouping using ArcPy
I have a number of layers that I want to manipulate with ArcPy. On my ArcGIS Pro map I have them under a group layer.
To deal with them, I have been picking them by name as follows:
for theLayer in ...
3
votes
1
answer
1k
views
Error in ArcGIS Pro when Adding Layer to Group through ArcPy
I'm trying to add layers to an empty group layer through arcpy in ArcGIS Pro. I've read that creating empty group layers only works by importing a saved template. I'm able to load my template and it ...
2
votes
1
answer
1k
views
Apply a definition query to a Layer Group
I'm trying to apply a definition query to multiple layers within a Layer Group by using the following script where I would simply change the values for my 'SUBCODE' field:
import arcpy
#Variables to ...