Skip To Content

GetParameterValue

Summary

For a specified tool name, returns the default value of the desired parameter.

Syntax

GetParameterValue (tool_name, index)
ParameterExplanationData Type
tool_name

The tool name for which the parameter default value will be returned.

String
index

Index position of the parameter in the specified tool's parameter list.

Integer
Return Value
Data TypeExplanation
String

Returns the default value of the specified parameter for the tool.

Code sample

GetParameterValue example

Returns the default value for specified tool parameter.

import arcpy

# Returns 'POLYGON'
print(arcpy.GetParameterValue("CreateFeatureClass_management", 2))

Related topics