I am developing a toolbar by the pythonaddins, in regards to define all the input raster files. I wrote the follwoing lines so the user enters how many data he wants to read and accordingly, an input box will be displayed
# Import
import arcpy, os,sys, pythonaddins
Folder_Location = arcpy.GetParameterAsText(0) # please select a folder to save the project files
ScN=arcpy.GetParameterAsText(1) # please write the number of scenarious to be compared
#-----------------------#
ScN=int(ScN)
for i in range (1,int(ScN)+1):
MessageD='Select the raster layer of flood depth for scenario No '#+ str(i)
Depth_rstr[i]= pythonaddins.OpenDialog(MessageD,False,r'C:\','Select')
unfortunatly, the OpenDialog window just display folders without allowing me to double click it to select any file
hoowever when I write the same lines in python window, it works well
I notices when I operate this puthonaddins- button, I got this error in the python window
TypeError: GPToolDialog() takes at most 1 argument (2 given)
Could any one advice me, how to solve this problem? I want this could to select files.