Getting a list of tables

The arcpy.mapping module also has a ListTableViews() function that you can use to obtain a list of standalone tables that are contained within a map document. In this recipe, you will learn how to use the ListTableViews() function to create this list of tables.

Getting ready

In addition to providing the ability to generate a list of layers in a map document or data frame, the arcpy mapping module also provides a ListTableViews() function that generates a list of tables.

Note

ListTableViews() only works with map document files and the data frames contained within. Layer files do not have the capability of holding tables.

How to do it…

Follow these steps to learn how to get a list of standalone tables in a map document:

  1. Open ...

Get Programming ArcGIS 10.1 with Python Cookbook 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.