GetParameterValue
サマリー
For a specified tool name, returns the default value of the desired parameter. The parameter is specified by either index or parameter name.
構文
GetParameterValue(tool_name, index)
| パラメーター | 説明 | データ タイプ |
|---|---|---|
|
tool_name |
The tool name for which the parameter default value will be returned. |
String |
|
index |
The index position of the parameter or the name of the parameter. |
Integer |
戻り値
| データ タイプ | 説明 |
|---|---|
|
String |
Returns the default value of the specified parameter for the tool. |
コードのサンプル
GetParameterValue example 1
Returns the default value for specified tool parameter using the parameter's positional index.
import arcpy
# Returns 'POLYGON'
print(arcpy.GetParameterValue("CreateFeatureClass_management", 2))
GetParameterValue example 2
Returns the default value for specified tool parameter using the parameter's name.
import arcpy
# Returns 'POLYGON'
print(arcpy.GetParameterValue("CreateFeatureClass_management", "geometry_type"))