Scripting Tools: Disabling Batch processing

222
5
Jump to solution
12-15-2021 01:08 PM
AlfredBaldenweck
Occasional Contributor III

Hi all, 

I have a scripting tool that batch processes data by default. Is there a way to turn off the "Right-Click>Batch" option?

Thanks!

0 Kudos
1 Solution

Accepted Solutions
DanPatterson
MVP Esteemed Contributor

In

C:\_Your_Install_folder_\Resources\ArcToolBox\toolboxes\batch_gp.xml

Never tried it...

<!--# Disable the batch command for these tools, one line per tool, format - <tool id="<toolbox alias>.<tool name>" /> -->
<batch>
<tools>
<tool id="analysis.Intersect"/>

..... snip

 


... sort of retired...

View solution in original post

5 Replies
2Quiker
Occasional Contributor II

You can create a batch to run a python script, something like below.

@echo off
"C:\Python27\ArcGIS10.8\python.exe" "C:\pythonscripts\pythonscript.py"
pause

 

0 Kudos
DanPatterson
MVP Esteemed Contributor

In

C:\_Your_Install_folder_\Resources\ArcToolBox\toolboxes\batch_gp.xml

Never tried it...

<!--# Disable the batch command for these tools, one line per tool, format - <tool id="<toolbox alias>.<tool name>" /> -->
<batch>
<tools>
<tool id="analysis.Intersect"/>

..... snip

 


... sort of retired...
DuncanHornby
MVP Frequent Contributor

Interesting nugget of info this is! Should emphasise this appears to be a solution for ArcPro and there is no equivalence for ArcMap?

0 Kudos
AlfredBaldenweck
Occasional Contributor III

Thanks for the response. This looks like it would work on a local computer, but would it work if I sent the script tool to someone else?

0 Kudos
DanPatterson
MVP Esteemed Contributor

No.  And there is no way to disable it.  You could write your code to only accept the first element in any list passed to the tool, essentially incapacitating any attempt to batch.  You would then have to encrypt your toolbox 


... sort of retired...
0 Kudos