ArcGIS Pro queuing toolvalidation requests?

769
2
09-03-2017 08:23 AM
MarcoBoeringa
MVP Regular Contributor

This is something I have been running into for quite a while, which has a drastic negative effect on the use of one of my tools.

I have a geoprocessing tool that adds a lot of different layers one-by-one to the Pro map TOC.

After processing, instead of simply finishing and be done with it as happens in ArcMap, Pro's toolvalidation seems to continue for ever. Contrary to ArcMap, where a tool changes state when you click the OK button, Pro keeps the tools dialog open, and seems to trigger toolvalidation for every tiny change to the TOC. However, since a tool run is on the way, it seems Pro is kind of queuing up toolvalidation requests, as it cannot process them right away.

This is really problematic, as it means that with a large number of layers added one-by-one (which is no problem in ArcMap!), Pro creates a huge "backlog" of toolvalidation to go through.

In fact, I have had cases where the tool finished within maybe a few hours, but Pro did not release the interface and kept showing toolvalidation progress (the moving bar / dots in the top of the tool dialog) for another day or so, or not even finishing before I lost patience and killed the app.

Have others had similar experiences, with toolvalidation locking out the entire ArcGIS Pro app from usage for extended periods of time?

If my theory about the queuing up of toolvalidation requests is right, I think Pro needs changing: it needs to drop any pending toolvalidation requests as soon as any change to the TOC (layers or tables deleted/added) takes place, so as to prevent the build up of a senseless toolvalidation queue.

0 Kudos
2 Replies
DanPatterson_Retired
MVP Emeritus

So you aren't launching other tools or opening dataset as warned in the help topic? What does your tool validation script look like?

0 Kudos
MarcoBoeringa
MVP Regular Contributor

This is unfortunately not the type of run-of-the-mill of toolvalidation script that I can easily share. There is a lot of special things going on, and import of modules.

Despite that, interacting with the tool and its parameters is no issue. The toolvalidation runs OK when the tool is opened the first time, and when I interact with its parameters, its just a few seconds. It is just the continuous toolvalidation I see once the tool finishes that worries me. There is nothing in my code that would obviously explains this, and again, when interacting with the dialog the first time, its OK. So the time required to run the code is not excessive.

However, it would definitely be excessive if indeed Pro senselessly queues toolvalidation requests during the entire run of the tool. My tool adds several hundreds of layers to the TOC. If each one triggers a toolvalidation run, and is not dropped as soon as the next layer is added (which would in fact invalidate the previous toolvalidation run, as the contents of e.g. a parameter showing feature layers, is no longer valid once the next layer is added), this would potentially explain the behavior witnessed.

Anyway, this is still all a lot of speculation by me. I would appreciate some insights by ESRI though concerning the toolvalidation behavior differences in ArcMap versus Pro in general...

0 Kudos