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:
input = arcpy.GetParameterAsText(0)
clipfeature = arcpy.GetParameterAsText(1)
output = arcpy.GetParameterAsText(2)
arcpy.env.workspace = output
inputSp = input.split(";")
for i in inputSp:
arcpy.Clip_analysis(i, clipfeature, i)
Then you should mark Curtis' answer as the correct one because it better describes your situation and requirements to arrive at a solution. Also, it's best if you post the current code version you are stuck at in your original post so the forum members can arrive at a solution much quicker rather than having to dig out what it is you are attempting -- I couldn't quite tell what you needed to accomplish and was the reason for my questions rather than posting an actual solution or sample.
Glad you figured it out.
James, there was no code I stucked with. The code was written after your suggestions :-)
Thanks James, you're a peach.
Retrieving data ...