Skip to main content

All Questions

Filter by
Sorted by
Tagged with
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 "...
HKN's user avatar
  • 45
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....
Kat's user avatar
  • 311
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 ...
Dan's user avatar
  • 1,100
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....
wunderkind's user avatar
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 ...
Maxcot's user avatar
  • 265
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. ...
Sineik's user avatar
  • 27
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 ...
zozo's user avatar
  • 33
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 ...
pac_co's user avatar
  • 547