AnsweredAssumed Answered

python script tool - use folder or file location under validation

Question asked by orrgvili on Mar 23, 2018
Latest reply on Oct 11, 2018 by philna_BMI

i have tool one of the parameter have is folder location (can be file it self) of jason file with parameters organized in dictionary 
i need to use this location under the" def updateParameters(self): " so i can open the  jason and load the parameters to the drop down menu 

this is the part that i cant figure if i used the real path with the dn like  dn = "c:/workspace"
it works great  but i need the path the user enter when the tool is used 

 


data= os.path.join(dn, 'data.json')
with open(data) as data_file:
dic = data.load(data_file)
self.params[3].filter.list = dic.keys()
return 

Outcomes