1

I've broken a complex task down to a very simple exercise and still can't get it to work... I need to set up a Python Script to Run a Model.

  • model: "SelectTest"
  • toolbox: "INTEGRITY_TOOLS.tbx".
  • location: c:\Work\INTEGRITY\INTEGRITY_TOOLS.tbx
import arcpy
arcpy.ImportToolbox (r"c:\Work\INTEGRITY\INTEGRITY_TOOLS.tbx", "SelectTest")
arcpy.SelectTest()
2
  • 1
    You're setting the alias as SelectTest, but what is the model's name? SelectTest? The easiest way to get the right call is to import the toolbox as you are (importtoolbox) in the Python window, then start typing arcpy.Sel... and the intellisense will show you. probably going to be arcpy.SelectTest_SelectTest()
    – KHibma
    Commented Nov 26, 2013 at 20:05
  • 2
    Instead of arcpy.SelectTest() try arcpy.SelectTest_SelectTest() if your tool's name is also SelectTest. Commented Nov 26, 2013 at 20:13

1 Answer 1

1

As commented by @Matthew, they:

had to add a Label in the Alias box within the Toobox and get the order right on the 3rd line: arcpy.SelectTest_IntegrityTools()

Your Answer

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

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