2

I am new to ArcGIS and facing a problem in calling a script tool from a model.

I have the following file structure:

  • E:\MyFolder
    • MyToolbox.tbx
      • ScriptTool
      • Model
    • Scripts
      • myscript.py

The ScriptTool uses 'E:\Scripts\myscript.py' as the script file and is configured to use relative path. Hence, even if I move MyFolder from E:\ to D:\ , the ScriptTool is able to find myscript.py and it executes successfully.

Also the ScriptTool is added to the Model. The Model works fine if MyFolder is in E:\ but if I move MyFolder to D:\ , the Model cannot run as it is not able to find the ScriptTool.

Please help me by suggesting how I can add the ScriptTool to the Model such that the model uses relative paths to the script tool.

2
  • Possibly related: gis.stackexchange.com/questions/54977/… Commented Jul 23, 2015 at 10:03
  • This is an old and long document from the 9.3 Help but it may explain what is going on: webhelp.esri.com/arcgisdesktop/9.3/… I've had a long day so am not keen to try and explain it but if the link does not help you perhaps someone else can. Commented Jul 23, 2015 at 10:09

1 Answer 1

1

This is an old and long document from the 9.3 Help solved my problem.

On right clicking the model and opening the properties, there was the option to use relative paths.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.