ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

GetParameterCount

  • Summary
  • Syntax
  • Code sample

Summary

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.

Syntax

GetParameterCount (tool_name)
ParameterExplanationData Type
tool_name

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

String

Return Value

Data TypeExplanation
Integer

The number of parameters for the specified tool.

Code sample

GetParameterCount example

Returns the number of tool parameters.

import arcpy

# Returns 7
print(arcpy.GetParameterCount("Buffer_analysis"))

Related topics

  • CopyParameter
  • GetArgumentCount
  • GetParameter
  • GetParameterAsText
  • GetParameterInfo
  • GetParameterValue
  • SetParameter
  • SetParameterAsText
  • Setting script tool parameters

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2021 Esri. | Privacy | Legal