Skip to main content

GetParameterCount

汇总

用于返回指定工具的参数值计数。 如果此工具包含在自定义工具箱中,请使用 ImportToolbox 函数以访问此自定义工具。

语法

GetParameterCount(tool_name)

参数 说明 数据类型

tool_name

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

String

返回值

数据类型 说明

Integer

指定工具的参数数量。

代码示例

GetParameterCount 示例

返回工具参数数量。

import arcpy

print(arcpy.GetParameterCount("Buffer_analysis"))