Can anyone post the code to move a layer to a SUB-group-layer?
The following code (courtesy of https://gis.stackexchange.com/questions/475584/move-an-existing-layer-into-a-group-layer-using-arcpy-in-arcgis-pro) works fine for copying the layer to a top-level group-layer, but I can't get it working for a group layer within another group layer e.g. MyGroupLayer/SubGroupA
Thanks,
Shane
lyr_to_move = mp.listLayers("My Layer Name")[0]
group_layer = mp.listLayers("MyGroupLayer")[0]
# Use this to move layers (but not into a group layer)
#mp.moveLayer(group_layer, lyr_to_move, "AFTER")
# Use this to move a layer into a group layer
mp.addLayerToGroup(group_layer, lyr_to_move, "AUTO_ARRANGE")