Select to view content in your preferred language

Can a credit estimator be added to a script tool?

427
1
11-02-2022 12:22 PM
StephenRhone
Occasional Contributor

I have written a couple of route analysis scripts and converted them to script tools - one of them is for US data and uses the BA network dataset we've downloaded, while the Canadian version uses the AGOL network dataset, and thus consumes credits.  I have seen that some Esri tools have built-in functionality to estimate how many credits a given analysis will consume prior to running it - does there exist Arcpy language that would allow this to be written into a script tool as well?  This would be a beneficial reminder before attempting to run a large analysis so that we don't burn through all of our credits.

Tags (3)
0 Kudos
1 Reply
by Anonymous User
Not applicable

I don't think there is anything built into arcpy, but you can probably make your own messages using the table of credits cost and doing some math within the Tool Validator Class.

 

0 Kudos