Does anyone now how to add a group layer with Python in ArcGIS Desktop 10?
I can use arcpy.mapping.AddLayer but surely this is only for an actual layer as opposed to a group layer.
so far I have this
import arcpy
mxd = arcpy.mapping.MapDocument("CURRENT")
df = arcpy.mapping.listdataframes(mxd, "layers")[0]
arcpy.mapping.AddLayer
groupLayer = arcpy.mapping.ListLayers(mxd, "AAAA", dataFrame)[0]– Gabriel Littman May 24 '16 at 02:28createGroupLayer (name, group_layer)in theMapclass. If you are still on 2.x, this answer is still valid butarcpy.mp.LayerFileis nowarcpy.mapping.Layer. – Marc_Alx Mar 02 '23 at 09:31