2. Open the the properties of your *.tbx in the Catalog Window, assign a very unique alias there
Derek,Freddie brings up a good point here, although he has crossed the line by adding a modifier to the word "unique" (Mr. Language person reminds us that something is either unique or not unique, there is no in between; "peculiar" would be more accurate, but has negative connotations. But I digress. Sorry, I hear this on the TV machine all the time and it's a family heirloom pet peeve.)I'm guessing that on your 10.0 session you have two toolboxes with the same alias loaded in your ArcMap session or arcpy. If you have a tool name that is not unique between the toolboxes, arcpy will not be able to resolve the tool name and it comes up missing. I wish arcpy.ImportToolbox() checked for this problem and printed a warning. In fact, I am going to go drop that on ideas.esri.com right now. Please vote it up.Here's a simple example of the problem. I have two simple toolboxes. Toolbox1.tbx --> Model1Toolbox2.tbx--> Model1--> Model2
>>> arcpy.ImportToolbox(r"D:\Users\cprice\work\Toolbox1.tbx","Derek")
<module 'Derek' (built-in)>
>>> dir(arcpy.Derek)
['Model1', '__alias__', '__all__', '__builtins__', '__doc__', '__name__', '__package__', '__pathname__']
>>> arcpy.ImportToolbox(r"D:\Users\cprice\work\Toolbox2.tbx","Derek")
<module 'Derek' (built-in)>
>>> dir(arcpy.Derek)
['Model1', 'Model2', '__alias__', '__all__', '__builtins__', '__doc__', '__name__', '__package__', '__pathname__']
>>> arcpy.Derek.__all__
['Model1', 'Model2', 'Model1']
The tool list is now non-unique so arcpy cannot find Model1 (but Model2 is OK):>>> arcpy.Model1_Derek()
Runtime error
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "D:\Users\cprice\work\Toolbox2.tbx", line 21, in Model1
AttributeError: Object: Tool or environment <Model1_Derek> not found
>>> arcpy.Model2_Derek()
<Result ''>
To fix the issue, drop the toolbox and start again:
>>> del arcpy.Derek
>>> arcpy.ImportToolbox(r"D:\Users\cprice\work\Toolbox2.tbx","Derek")
<module 'Derek' (built-in)>
>>> arcpy.Derek.__all__
['Model2', 'Model1']
>>> arcpy.Model1_Derek()
<Result ''>