Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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.

share|improve this question
    
Possibly related: gis.stackexchange.com/questions/54977/… –  PolyGeo Jul 23 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. –  PolyGeo Jul 23 at 10:09

1 Answer 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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.