Add support for accessing geoprocessing history items programmatically using the ArcGIS Pro SDK

1192
4
07-20-2022 06:01 PM
Status: Implemented
Labels (1)
MikeDavlantes
New Contributor III

The problem and suboptimal workaround solution are described here. Basically, we have an ArcGIS Pro add-in that logs metadata about your geoprocessing activity in Pro. By listening to project items changed events we know that a geoprocessing tool has been started, but we can't get any information about the tool parameters or messages it outputs. These parameters and messages are present in the SDK as HistoryProjectItems, but part of a sealed class that cannot be publicly accessed.

The geoprocessing history gets written out to the aprx file when a project is saved, but tearing that file apart to find the relevant geoprocessing history parameters requires that we wait until a user has saved to access that information. Allowing public access to HistoryProjectItems from the SDK would make the process much more robust and reliable.

4 Comments
MikeDavlantes

At the 2022 UC, I spoke with @Anonymous User and @CharlesMacleod about this issue to confirm that I wasn't missing some other way of accessing the geoprocessing history via the SDK.

by Anonymous User

A new event has been added at Pro 3.1.  Add-ins can subscribe to this event which is fired anytime a GP Tool is executed in the session via the UI or the Pro Public API.  The event contains a GP history item containing information about which tool was executed, parameters used, result, etc.

@MikeDavlantes  

For any questions or comments, please tag Original Publisher - @ChristopherZent ("Anonymous User")

MikeDavlantes

Great news! Thanks Christopher! We're excited to test it out.

VedantBajaj
Status changed to: Implemented