GetParameterCount

摘要

Returns a count of the parameter values for the specified tool. If the tool is contained in a custom toolbox, use ImportToolbox to access the custom tool.

语法

GetParameterCount (tool_name)
参数说明数据类型
tool_name

The name of the tool for which the number of parameters will be returned.

String
返回值
数据类型说明
Integer

The number of parameters for the specified tool.

代码示例

GetParameterCount example

Returns the number of tool parameters.

import arcpy

# Returns 7
param_count = arcpy.GetParameterCount("Buffer_analysis")

相关主题


7/10/2012