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

Delete Grids And Graticules

  • Summary
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

Summary

Deletes all the features associated with one or more selected grid and graticule layers from a feature dataset.

Usage

  • You can select all the grid and graticule layers for deletion or specify only the ones you want deleted from the Grid Name list.

  • You can unselect all previously selected grid and graticule layers to prevent deletion of any grid and graticule layers or unselect only specific ones not to delete.

  • A grid dataset that has been renamed cannot be used as an input dataset to this tool because the suffix of the grid feature classes will no longer match the name of the grid.

Syntax

arcpy.cartography.DeleteGridsAndGraticules(in_grid_dataset, grid_name)
ParameterExplanationData Type
in_grid_dataset

The feature dataset location where the grid and graticule layers that can be deleted are stored.

Feature Dataset
grid_name
[grid_name,...]

Lists the grid and graticule layers in the feature dataset that can be deleted.

String

Code sample

DeleteGridsAndGraticules tool Example (Python Window)

Deletes grid and graticule layers from a feature dataset.

import arcpy
from arcpy import env
env.workspace = "C:/Python_Output"
arcpy.DeleteGridsAndGraticules_cartography("C:/Python_Output/grid_layers.gdb/QUAD_24K", 
"Plaza Washington (Quad_24K_NAD83)")
DeleteGridsAndGraticules tool Example (Stand-alone Python script)

Deletes grid and graticule layers from a feature dataset.

# Name: DeleteGridsAndGraticules.py 
# Description: Delete grid(s) from a feature dataset. 
# Author: ESRI 

# Import system module 
import arcpy 

# Enabling logging of the results 
arcpy.logHistory = True
 
# Set the values of the tool's parameters 
input_grid_dataset = "C:/Python_Output/grid_layers.gdb/QUAD_24K" 
grid_name = ['Plaza Washington (Quad_24K_NAD83)','Swift Minnesota (Quad_24K_NAD83)'] 

# Process: Delete Grids and Graticules 
arcpy.DeleteGridsAndGraticules_cartography(input_grid_dataset, grid_name) 
print "Grids and Graticules features deletion successful"

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: No
  • Standard: Yes
  • Advanced: Yes

Related topics

  • An overview of the Grids and Graticules toolset
  • What are grids and graticules?
  • Grid and graticule layers
  • A quick tour of data frame grids and the Grids and Graticules Wizard

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