laptop and a wrench

Bogue

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
Numéro d’ID de bogue BUG-000159274
EnvoiJune 21, 2023
Dernière modificationJune 5, 2024
S’applique àArcGIS Pro
Version trouvée3.1.2
Système d’exploitationWindows OS
Version du système d’exploitation10.0 64 Bit
StatutAs Designed

Informations supplémentaires

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.

Solution de contournement

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.

Étapes pour reproduire

ID de bogue: BUG-000159274

Logiciel:

  • ArcGIS Pro

Recevoir une notification lorsque le statut d’un bogue change

Télécharger l’application Esri Support

En savoir plus sur ce sujet

Obtenir de l’aide auprès des experts ArcGIS

Contacter le support technique

Télécharger l’application Esri Support

Accéder aux options de téléchargement