laptop and a wrench

Error

The addDataFromPath() function fails to add a feature class to the map in ArcGIS Pro if the project path is hardcoded and the referenced project is open.

ArcGIS Pro
Número de ID del error BUG-000159274
EnviadoJune 21, 2023
Última modificaciónJune 5, 2024
Relacionado conArcGIS Pro
Versión encontrada3.1.2
Sistema operativoWindows OS
Versión de sistema operativo10.0 64 Bit
EstadoAs Designed

Información adicional

This is as designed. In ArcGIS Pro 2.9 the capability to open already open projects as read-only. They same behavior changed in the UI as well. In this case, if you already have the referenced project open and you try to reference it again with arcpy.mp, you can NOT save changes to it. You would need to call saveACopy(). Also added an isReadOnly property to the ArcGISProject object.

Solución alternativa

Use the CURRENT keyword rather than the project path if the code is being run within the desired project. Alternatively, make sure the referenced project is closed when running the addDataFromPath() function with a specified project path.

Pasos para reproducir

ID del error: BUG-000159274

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