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.
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.
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.
For any questions or comments, please tag Original Publisher - @ChristopherZent ("Anonymous User")
Great news! Thanks Christopher! We're excited to test it out.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.