From the course: Learning ArcGIS Python Scripting (2018)

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Help for list functions

Help for list functions - ArcGIS Tutorial

From the course: Learning ArcGIS Python Scripting (2018)

Start my 1-month free trial

Help for list functions

- [Instructor] When first writing a Python script to interact with the GIS world, the ArcGIS desktop help is essential. I'm gonna write a script to make a list of all the data frames in a map document. While writing the script, I'll make use of the help system in ArcMap to make sure that I completely understand how to use the objects, methods, and properties. I've got a new script open here in IDLE, and I've already added the comment block and the pseudocode. I've also already imported arcpy and created the MapDocument object to point to one of my maps using arcpy.mapping.MapDocument. Since I've already done this, the code can access contents of the map document with some of the list functions. I need to get a list of the data frames in a map document. Let's look at the ArcMap help to see what list function I would use. So I'll open the help, and I'll just search for list data frames. Here's the ListDataFrames arcpy.mapping function. Notice that this list function needs to know what…

Contents