Select to view content in your preferred language

ArcGIS Pro Python Toolbox updates enterprise geodatabase geometry, but map does not refresh until restart

103
3
Jump to solution
11 hours ago
Labels (1)
SrinijaKonduru
Occasional Contributor
Hello, I am using an ArcGIS Pro Python Toolbox (.pyt) to update lease geometries in an enterprise geodatabase using an edit session and arcpy UpdateCursor. The tool runs successfully and the geometry changes are written to the database, but the updates are not reflected in the map. The changes only appear after reopening ArcGIS Pro or removing and re-adding the layer. I have tried arcpy.RefreshLayer, ClearWorkspaceCache, and even forcing a version reset with ChangeVersion_management, but nothing has worked so far... The same logic works correctly in an ArcGIS Pro Notebook, where updates are visible immediately. Is there a way to force the map to refresh after ArcPy edits on enterprise geodatabase layers ?
Thank you!
0 Kudos
1 Solution

Accepted Solutions
George_Thompson
Esri Notable Contributor

When you have the layer in the Pro map, have you tried the "Refresh Version" in the Versioning tab: https://doc.esri.com/en/arcgis-pro/latest/help/data/geodatabases/overview/versioning-tab.html#970?

--- George T.

View solution in original post

3 Replies
George_Thompson
Esri Notable Contributor

When you have the layer in the Pro map, have you tried the "Refresh Version" in the Versioning tab: https://doc.esri.com/en/arcgis-pro/latest/help/data/geodatabases/overview/versioning-tab.html#970?

--- George T.
SrinijaKonduru
Occasional Contributor

This worked, thank you so much!

George_Thompson
Esri Notable Contributor

Glad that helped!

I have found that Pro caches the data from the version in the map for better user experience. I also encounter this in branch versioned workflows.

--- George T.
0 Kudos