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.

Ive broken a complex task down to a very simple excersise and still cant get it to work.... I need to set up a Python Scpript 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()

If anyone can help me get over this embarrassing hump, i'd appreciate it!

share|improve this question
    
What ArcGIS for Desktop version are you using? I think the way to do this changed at one point. –  PolyGeo Nov 26 '13 at 19:55
    
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 Nov 26 '13 at 20:05
    
Instead of arcpy.SelectTest() try arcpy.SelectTest_SelectTest() if your tool's name is also SelectTest. –  Jason Scheirer Nov 26 '13 at 20:13
    
Thanks for all your comments! it finally worked; I had to add a Label in the Alias box within the Toobox and get the order right on the 3rd line: arcpy.SelectTest_IntegrityTools() –  Matthew Nov 26 '13 at 20:59
    
Would you be able to add this as a self-Answer that you can then self-Accept, please? –  PolyGeo Dec 1 '13 at 10:31

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.