Select to view content in your preferred language

refresh attribute table after calc

361
3
12-12-2022 10:13 PM
mody_buchbinder
Occasional Contributor III

This came out here a few times with different titles.

I have a layer in Pro with open attribute table.

When I use calculate field tool or when I write a line in the python windows to update any values the attribute table is refreshed automatically and show the new values.

More then that, when I run a python within a tool that have only the layer name in the toc Pro will refresh the table.

When I have  the full path of the data in my update script the table is not refreshed.

This is fine since Pro should not check all the time if the source data is updated.

What can be a big help is a button "Reload data".

Pro uses many caches and I could not fine any way to see the updated data other then remove the layer from Pro and bring it back or just close the project and reopen if I do not want to lose symbology.

The same is true if the source data was update in any other way (csv on disk or sql update in database)

Thanks

0 Kudos
3 Replies
DanPatterson
MVP Esteemed Contributor

You might want to move this to a python idea rather than a question


... sort of retired...
0 Kudos
RhettZufelt
MVP Notable Contributor

With my cache setting as follows:

RhettZufelt_0-1670956881091.png

 

I can not reproduce.  Pro always updates the table when the calculate field script finishes.  Doesn't  matter if I pick the TOC layer from the dropdown or navigate to the FGDB FC directly.

R_

0 Kudos
mody_buchbinder
Occasional Contributor III

Hi

I was not aware of this propery but even select the do not cache did not solved the problem.

Try to write a python script that can update a field even if it runs as stand alone - so it have full path to the data.

Then make it a tool in toolbox (no parameters).

After I run it the only way to see the updated value (in attribute table, in identify and in labels) is to close and reopen the project.

Let me know if you cannot see it and I will send a movie

Thanks

0 Kudos