5

Is there a way to tell programatically (from the command line) what format a given ArcMap toolbox was saved in - 10.0, 10.1 and so on?

PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
asked Nov 29, 2013 at 17:05

1 Answer 1

8

I think the short answer is NO. In arcpy you would typically "Describe" an object to get a handle on its properties. It appears there is no way within arcpy to find out the version the toolbox was saved in. If anyone knows of a way then please shoot me down in flames so I can learn from your wisdom!

But you could fudge it this way:

In ArcCatalog right click on the toolbox and go to properties. In the Description write a description of your toolbox and then right at the end write something like "[Version_10_1]" to indicate its a 10.1 toolbox.

In you python code you could then use something like:

obj = arcpy.AddToolbox("C:/temp/testbox.tbx")
description = arcpy.Usage(obj)
if "[Version_10_1]" in description:
 print "10.1 toolbox loaded"
answered Nov 29, 2013 at 18:24
3
  • Nice idea, alas doesn't work for me. My problem is that I keep releasing 10.1 toolboxes by mistake because they save to 10.1 by default when I change them. 10.0 users obviously have problems with this :( I was hoping to add a step to my build script that checked all the toolboxes were 10.0, shame if it's not possible. Commented Dec 2, 2013 at 10:30
  • 1
    I've added an idea to the ESRI ideas site, so get voting! Commented Dec 2, 2013 at 11:17
  • :) Of course there is a way... install arcgis 10.0 inside a virtual machine and have my build script test it on that machine. Alas this is way beyond my budget! Commented Dec 5, 2013 at 13:15

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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.