Is there a way to refresh the data in a feature class's attribute table after running a standalone Python script?
Fully closing and re-opening ArcGIS Pro does accomplish this kind of refresh. But it would be very helpful to get it to refresh without having to close the program!
I'm using Pro 3.0.3 and cannot upgrade for a long time, due to my organization's needs relating to versions of License Manager, ArcGIS Server, existing map services and apps, etc.
I'm running a standalone Python script that edits attribute data in a feature class that's in an enterprise geodatabase. I am both editing and viewing the default, not a version. After running the script, the edits do not appear in Pro, unless I close and reopen the software. I have tried closing and reopening the attribute table, refreshing the data source in the Catalog pane (you'd think that would do it, but it does not), and panning/zooming the map in Pro. None of that makes the edits appear in the table. Any ideas?
Thank you!
Solved! Go to Solution.
Thank you for the information!
I don't want to remove and re-add the layer in this case, since it has complex symbology. But that would be handy in many cases.
There is an enhancement request in the Product Plan that's somewhat related to your question. ENH-000135306 - Implement a screen refresh when edits are made to features after a data access module is run in a Python script/tool in ArcGIS Pro." Hopefully soon!
Okay, that's good to know. Thank you very much for sharing that!
What is the status of ENH-000135306? Is there somewhere I can view the status?
Thanks.
Hi Matt - I just pulled up the ENH-000135306 request to determine it's status - still show "in the product plan." Not terribly helpful I know but that's the current status.
@Robert_LeClair has this enhancement request been completed? We still can't see data created via python script unless we manually refresh a version.
@melisahansen - as of 7/15/24, its status is still "in the product plan." I don't see any new updates unfortunately.
I'm running a python script from a toolbox tool (ArcGIS Pro 3.3.0) and it still doesn't refresh the attribute table. Nothing seems to except refreshing from Data Source > Refresh on the Contents pane. My data is in an enterprise geodatabase (sql server) and versioned using traditional versioning. I'm also using the new arcpy.RefreshLayer() command that came in with 3.3.0 but that does nothing. I suspect because it's on a versioned feature class.
This is just super annoying - I just want an arcpy command that does the same as Data Source > Refresh.