Using a ValueTable to provide multivalue input to a tool

Many geoprocessing tools have input parameters that accept more than one value. For example, the multiring buffer tool accepts multiple buffer distances, the delete field tool accepts multiple fields that can be deleted, and there are many other examples. In this recipe, you will learn how to create a ValueTable object that serves as multivalue input to a tool.

Getting ready

There are three ways to specify a multivalue parameter: as a Python list, a string with each value separated by semicolons, or an ArcPy ValueTable object. In this recipe, we're going to take a look at how to specify mutlivalue input parameters by using ValueTable.

How to do it…

Follow these steps to learn how to use a

Get Programming ArcGIS with Python Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.