ERROR Only polygon shapefiles allowed

894
6
04-07-2018 02:04 AM
Simeon_FranzWetzel
New Contributor

I use a python script tool in ArcMap which has two input parameters. The tool only allows to use shapefiles as input. My problem is, that the data I use is organized in feature classes within a geodatabase. Is there a possibility to change the code so that the tool works either with shapefiles and also with (polygon) feature classes? I thought, maybe if the tool recognizes that the input data is a feature class it can automatically convert it like with FeatureClassToShapefile_conversion.

Thanks in advance.

python arcpy‌ arcmap 10.6‌ tool parameters‌ #parameter invalid

0 Kudos
6 Replies
JoshuaBixby
MVP Esteemed Contributor

Although there are some, there are very few Esri geoprocessing tools that only accept shape files and not feature classes.  What geoprocessing tools is the Python script tool using?

Simeon_FranzWetzel
New Contributor

Im not sure because there are a great deal of geoprocessing tools implemented into my tool. May I ask which tools you know that do not take shapefiles?

0 Kudos
DanPatterson_Retired
MVP Emeritus

or... Copy Features and save it as a shapefile

0 Kudos
Simeon_FranzWetzel
New Contributor

that works, but it is not very convenient for a big amount of data

0 Kudos
DanPatterson_Retired
MVP Emeritus

perhaps, but that only leaves you the option of writing your own implementation

RandyBurton
MVP Alum

Can you share more information about the script tool? Or even the tool itself?

0 Kudos