I need to set a default value for a Boolean parameter in my Python toolbox, but I didn't found any documentation about that. I'm able to do it using the custom toolbox wizard, but I found nothing on how to do the same in a python toolbox.
Any idea?
Thanks
Solved! Go to Solution.
Here is a small sample of adding a boolean value and adding a default value to it.
booleanTest = arcpy.Parameter(
displayName="boolTest",
name="booleanTest",
datatype="GPBoolean",
parameterType="Optional",
direction="Input")
booleanTest.value = "true"
Does this help?
Here is a small sample of adding a boolean value and adding a default value to it.
booleanTest = arcpy.Parameter(
displayName="boolTest",
name="booleanTest",
datatype="GPBoolean",
parameterType="Optional",
direction="Input")
booleanTest.value = "true"
Does this help?
Thanks Alexander, it works perfectly!
Why not do it through the interface? For example, you can right click on a toolbox script and access its properties etc, then bring up the dialog which allows you to establish the relationship etc between your input parameters and the script. This image is a visual of establishing a Folder as an input parameter.
Hi Dan,
I don't think that functionality is available with python toolboxes but rather script tools only.
Thanks Alexander ... never mind ...