Wednesday 16 October 2019

arcpy - Finding definitions of ArcGIS script parameter Data Type options?


When adding a python script to a toolbox in Arcgis one of the steps is to set parameters and specify what Data Type each requires. The list is long, perhaps a hundred, and many are not immediately understandable. For example I just tried to require data type "Database Connections", but when I run the tool and select "Database Connections\Connection to foobar.sde" I'm told the item is invalid. Aww nuts.


Now I could just ask "what is the "Database Connection" data type?" here on GIS.se and get on with my work, but then tomorrow I'll have to do it again for Disk Connection and Decimate. (might do wonders for my reputation level though...) So lets just get 'em all in one go, I hope:


Where do I find the definitions of all the Data Types available for tool parameters?


enter image description here



Answer




See 'Geoprocessing_data_types.pdf' in Data types for geoprocessing tool parameters


To answer your specific question, I belive you would want to use a Workspace parameter which will let you specify an SDE connection file, then use filters to limit the workspace type (see screenshots in comment below).


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...