self.params[0].filter.list = ['fee'] self.params[0].filter.list.append('foo')
Solved! Go to Solution.
self.params[0].filter.list = ['fee'] self.params[0].filter.list += ['foo']
self.params[0].filter.list = ['fee'] fl = self.params[0].filter.list = ['fee'] fl += ['foo'] self.params[0].filter.list = fl
self.params[0].filter.list = ['fee'] self.params[0].filter.list += ['foo']
self.params[0].filter.list = ['fee'] fl = self.params[0].filter.list = ['fee'] fl += ['foo'] self.params[0].filter.list = fl
os.getcwd sys.argv[0] os.path.abspath(__file__) inspect.getfile(inspect.currentframe())
def updateParameters(self): arcpy.env.workspace = self.params[0].value rasts = arcpy.ListRasters() if rasts: self.params[1].value = 'fee' else: self.params[1].value = 'foo' return
>>> arcpy.env.workspace = 'C:\noRastersDir' >>> rasts = arcpy.ListRasters() >>> rasts [] >>> if rasts: ... print 'a' ... else: ... print 'b' ... b
tbxLoc = sys.path[0]