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'
arcpy.GetParameterValue("CreateFeatureClass_management", 2)

Related Topics


10/28/2011