I used ModelBuilder to build a model and I exported it to python.

How can I define parameters for Python script in Python properties?

Can you explain about data type in script properties?

closed as off-topic by PolyGeo Feb 22 at 8:32

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "When seeking help to debug/write/improve code always provide the desired behavior, a specific problem/error and the shortest code (as formatted text, not pictures) needed to reproduce it in the question body. Providing a clear problem statement and a code attempt helps others to help you." – PolyGeo
If this question can be reworded to fit the rules in the help center, please edit the question.


Defining Parameters gives template code for creating parameters and settings such as multivalue, input/output, filtering results (only show integer fields, txt files) name, etc.

Data types explains all the different data types that parameters can take. In order to set your parameter, you'll need to use the keyword. Personally, I have a list of the most common parameters that I use on a regular basis in a txt file so that way I have quick access:

Any Value           GPType
ArcMap Document     DEMapDocument
Areal Unit          GPArealUnit
Boolean             GPBoolean
Double              GPDouble
Feature Layer       GPFeatureLayer
Field               Field
Field Info          GPFieldInfo
Field Mappings      GPFieldMapping
File                DEFile
Folder              DEFolder
Linear Unit         GPLinearUnit
Long                GPLong
Shapefile           DEShapefile
String              GPString
Table               DETable
Table View          GPTableView
Text File           DETextfile
Value Table         GPValueTable

Not the answer you're looking for? Browse other questions tagged or ask your own question.