Which DataType for Tool/Script Parameter

4075
6
01-13-2015 10:47 AM
JoeBorgione
MVP Emeritus

I'm trying to get a python script that has been provided to me to run as a tool.  One of the parameters is an output path where the tool creates a file geodatabase.  I have set the data type to folder and it errors out saying it does not exist or is unsupported.  It will warn me that the folder exists prior to execution with the little yellow(!) icon.  if I run it in that condition, the existing folder gets deleted.  (Thank goodness for network guys and nightly backups...)

I have also tried setting the out put path to data type = workspace and get same results.

Any suggestions?

That should just about do it....
Tags (2)
0 Kudos
6 Replies
AlexanderNohe1
Occasional Contributor III

Hi Joe,

Can you place your code online?

What is the tool that creates the file geodatabase?

Thanks!

DanPatterson_Retired
MVP Emeritus

the toolbox wasn't provided?  Try a string/text parameter and see what it does.  Without the code to view, you would be guessing.

XanderBakker
Esri Esteemed Contributor

The parameter is probably defined as output, thus may not exist or will be overwritten. It may not sound very logical to you, but change the direction to input of the folder parameter.

JoeBorgione
MVP Emeritus

Thanks for your replies gentlemen!

Something we discovered is it was developed on a 10.2.2 platform and I executed it on a 10.0 platform so that is probably playing a role in it too:  I ran the developers code with his test data on my machine as a python executable.  It ran without errors but the final output was not complete: it creates the file geodatabse just fine, but the feature class therein is not attributed as it should be.  In talking to developer, he thinks the difference in the newer cursors he's using is conflicting with the version of arcpy I have.

Xander,  I had it defined as output, but I think I see the logic for input.

I'm about to upgrade into 10.2.2 so once that is done, I'll see how it goes.

That should just about do it....
AlexanderNohe1
Occasional Contributor III

It sounds like your developer was using the data access module which I believe was introduced at 10.1 and not available at 10.0.  I am excited to hear about how the upgrade went.

XanderBakker
Esri Esteemed Contributor

Upgrade to a more recent version is  good idea. The da cursor were introduced at version 10.1 SP1 (if I'm correct) and provide a big performance boost.