Task verification using geoprocessing tools

395
2
Jump to solution
04-10-2019 11:34 PM
MattWeber2
New Contributor III

Hello everyone,

I am currently building a tool (with Python) that will eventually allow the user to do some Basic precipitation-runoff modeling. 

My employer originally wanted a single Toolbox that combines all steps, but the Code for that would be huge and quite complex. Since preparing the model consists of some pretty simple and repetitve steps, so I thought tasks could be a better solution. This would also increase the comprehensibility of the process and make it possible to split the code in severel tools, that can be maintained more easily.

Trying it out tentatively yesterday I unfortunetly hit a roadblock pretty much right away. One of the first steps in the process is to select the modelling area.

The intendet Input of this is a county wide layer of subbasins, additionally a river Network can be used for orientation, but is not needed. The current workflow intends the user to select all subbasins for which he will eventually want to get results. The upstream areas are then selected according to the structure of the data (see Picture (I saved the usually only selected areas for better visualization)).

The Problem I have comes after this step, I want to test if the any of the selected areas are over a certain size (limited by the modeling approach). At first I tried to do this with the inbuild verification options, which didn't work.

So I build a simple Python Toolbox that does the checks and which i would like to run in a (hidden) step after the selection. The Problem is, that it doesnt return/show any results unless its set to 'manual', in which case it will at least Show the 'run script' information + errors

The question now: is there a way to return the results of the toolbox when the step runs on auto(/is hidden)? Or is there another/better approach for the problem, or are tasks even the right tool for the Job?

Selected subbasins and resulting upstream areas. Areas are usually only selected for the test. I only created them for better viualization.

Thanks in advance for any help,

Matthias

PS: since is my first question here, i probably described the problem in too much detail, sorry for that

PPS: i hope I posted at the right Location

0 Kudos
1 Solution

Accepted Solutions
MatthewDriscoll
MVP Alum

I came across this same problem with running scripts within Tasks and eventually abandoned using the Tasks for it.  Go and vote this idea up.  Perhaps you could use a definition query and a count instead of a python script.

View solution in original post

0 Kudos
2 Replies
MatthewDriscoll
MVP Alum

I came across this same problem with running scripts within Tasks and eventually abandoned using the Tasks for it.  Go and vote this idea up.  Perhaps you could use a definition query and a count instead of a python script.

0 Kudos
MattWeber2
New Contributor III

Thanks for the quick Reply, even if it's not the answer I was hoping for.

I guess I will create a demo-Task with manual run/auto proceed for now and get some feedback if thats OK.

0 Kudos