Any ideas, python scripts?
Can you provide a little more detail? I'm guessing you want to present a dynamically generated list of checkboxes to the user. This would probably be a job for a Value Table parameter set up using a Python toolbox (pyt). Script tools in a tbx don't support value tables like this.
You could probably populate a filter values to select in validation code for a multi value of strings, but I don't know if that's really what you want and would be also kind of complicated to the tool user.
Sure you don't want to just present a SQL expression as a parameter and provide dialog documentation to guide the user to operate the select dialog that they already know how to use? (Sometimes less is more.)
The idea is to clip about 50 Layer with a given polygon. Because not always these 50 are needed, the user should be able to check or uncheck certain layer?
Is this a ESRI Add-in tool? If so, ESRI has a sample of populating the ComboBox and then running the desired process on the selected item:
ArcGIS Help 10.1
Seems to me a generic multivalue list of layers would work for this, the user can delete inputs they don't want.
If this is a list of datasets in a folder, you could use tool validation to read the data in and populate as multi-value list of strings. Checkboxes are supported for them.
From a usability perspective, for a tool I would lean toward doing it as a regular multi value (a list of layers, not with checkboxes) because that is more consistent with tools the user is used to (i.e. Intersect, Union, Append, etc). Add ins are a kind of different paradigm so the checkboxes may make more sense if you do it that way.
Thanks for your help. Unfortunately I can't generate Add-ins, because installations are forbidden 😞
So I tried this simple solution:
import arcpy
import os
input = arcpy.GetParameterAsText(0)
clipfeature = arcpy.GetParameterAsText(1)
output = arcpy.GetParameterAsText(2)
arcpy.env.workspace = output
inputSp = input.split(";")
for i in inputSp:
arcpy.AddMessage(i)
arcpy.Clip_analysis(i, clipfeature, i)
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.