I have got a toolbox full of models to run from one script.
Is there any code that calculates the location of script from which I can get the path to my toolbox?
Script and models are imported if that matters. Toolbox is going to be used on a few computers and running a script is more nice way than searching for models.
arcpy.ImportToolbox()
and then run the models as necessary. What do you want to do now?arcpy.ImportToolbox()
which was made on my computer will not run on the other one because of another location. I.e. I havearcpy.ImportToolbox(r"D:\Data\Folder\toolbox.tbx")
and other user placed in E:\Data\NewFolder\toolbox.tbx. In this case script will give an error. So is that possible to calculate the path to the only script?