Select to view content in your preferred language

How to open and close an attribute table in ArcGIS Pro with ArcPy?

1287
0
08-19-2022 05:36 AM
SethSobel1
New Contributor

I'm using ModelBuilder with a custom Python script in ArcGIS Pro to update a feature class in a file geodatabase. I migrated the tool from ArcMap to Pro recently and found that I was receiving an error upon running the tool:

ERROR 000224: Cannot insert features - Cannot acquire a lock.

Come to find out, in ArcGIS Pro, the tool will not run when the attribute table is open. That part is resolved. However, I want to review the new data record after each run of the tool. Opening and closing the attribute table with every tool run is a bit annoying and I would like the script to close the attribute table, run the script, then open the attribute table for review via Python or ModelBuilder. I've done a bit of Googling and haven't found how to open and close an attribute table programmatically.

The table is in the TOC. Ideally, I would like the tab to open in the pane below my map pane, but beggars can't be choosers.

Please help?

0 Replies