laptop and a wrench

Error

The 'addLayerToGroup' python function adds the layer redundantly to the target group layer as well as in the Table Of Contents as a separate layer in ArcGIS Pro.

Última publicación: February 18, 2019 ArcGIS Pro
Número de ID del error BUG-000110978
EnviadoJanuary 20, 2018
Última modificaciónJune 5, 2024
Relacionado conArcGIS Pro
Versión encontrada2.1
EstadoWill Not Be Addressed

Información adicional

This is being marked as designed. If you look at the code carefully, when calling m.addDataFromPath WITHIN addLayerToGroup, it is doing two things: First, adding a layer to the map AND also adding a layer to the group. The work around is to either add a layer to the map and then use MOVELAYER or reference a layer file. See code sample below#AddLayerToGroupm.addLayerToGroup(grpLyr, lyrFile, "TOP") #THIS DOES NOT DUPLICATEm.addLayerToGroup(grpLyr, m.addDataFromPath(FC), "TOP") #THIS DOES

Pasos para reproducir

ID del error: BUG-000110978

Software:

  • ArcGIS Pro

Recibir notificaciones cuando cambie el estado de un error

Descargar la aplicación de soporte de Esri

Descubrir más sobre este tema

Obtener ayuda de expertos en ArcGIS

Contactar con el soporte técnico

Descargar la aplicación de soporte de Esri

Ir a opciones de descarga