I have an ArcToolbox tool I created based on a script I wrote that needs an input parameter that equals the folder location of the ArcToolbox .tbx file from which the tool runs. I am distributing the toolbox, so users can run it from a variety of locations. How do I create a folder parameter that autofills with a default of the current .tbx location?
I have tried writing a bit of python under the Validation tab of the Tool properties:
def updateParameters(self): """Modify the values and properties of parameters before internal validation is performed. This method is called whenever a parameter has been changed.""" stringFilter = self.params.filter list =  pathname = os.path.realpath(".") list.append(pathname) stringFilter.list = list if not self.params.altered: self.params.value = stringFilter.list return
But when I run the tool, the only text that autofills into the parameter reads, "RemoteDatabase"