I am writing a Python script tool within a toolbox with *.tbx extension.
I need to make the input parameter flexible (feature class or shapefile) , so which data type I should select for this parameter?
Feature Class data type option will allow the end user the ability to choose from either shapefile or gdb feature class.
[ESRI software] In ArcGIS, a collection of geographic features with the same geometry type (such as point, line, or polygon), the same attributes, and the same spatial reference. Feature classes can be stored in geodatabases, shapefiles, coverages, or other data formats. Feature classes allow homogeneous features to be grouped into a single unit for data storage purposes. For example, highways, primary roads, and secondary roads can be grouped into a line feature class named "roads." In a geodatabase, feature classes can also store annotation and dimensions.
"Feature Layer" is going to be the most flexible, as this will accept any vector-based layer that is available on disk, and it will ALSO accept any layer that is in your table of contents.
The "Feature Class" option will only accept inputs on disk (or database).