>>> ###GridIndexFeatures >>> ###import system modules >>> import arcpy >>> from arcpy import env >>> >>> ###Set environment settings >>> arcpy.env.workspace = "C:\Users\RLong\Documents\WestJackson.mdb" >>> >>> ###Set Local Variables >>> outFeatureClass = "gridIndexFeatures" >>> inFeatures = "myGrid" >>> polygonWidth = "1000 feet" >>> polygonHeight = "1000 feet" >>> >>> ###Execute GridIndexFeatures >>> arcpy.GridIndexFeatures_cartography("grid", "WestJackson.mdb", "", "", "", ... "1000 feet", "1000 feet")
arcpy.env.workspace = r"C:\Users\RLong\Documents\WestJackson.mdb" or arcpy.env.workspace = "C:\\Users\\RLong\\Documents\\WestJackson.mdb" or arcpy.env.workspace = "C:/Users/RLong/Documents/WestJackson.mdb"
arcpy.GridIndexFeatures_cartography("grid", "myFeatureClass", "", "", "", "1000 feet", "1000 feet")
import arcpy arcpy.env.workspace = r"C:\Users\RLong\Documents\WestJackson.mdb" fcList = arcpy.ListFeatureClasses() for featureClass in fcList: arcpy.GridIndexFeatures_cartography(featureClass+"grid", featureClass, "", "", "", "1000 feet", "1000 feet")
###Script for creating a Grid Index for mapbook ### import arcpy, os, sys from arcpy import env arcpy.env.workspace = "C:/Users/RLong/Documents/WestJackson.mdb" ###Set Local variables outFeatureClass = "GridIndex" inFeatures = "WestJackson1983.gdb" polygonWidth = "1000 feet" polygonHeight = "1000 feet" startingPageNum = "1" ###Execute the Grid Index Features arcpy.GridIndexFeatures_cartography("GridIndex", "WestJackson1983", "", "", "", "1000 feet", "1000 feet", "", "", "", startingPageNum)
###Script for creating a Grid Index for mapbook ### import arcpy, os, sys from arcpy import env arcpy.env.workspace = "C:/Users/RLong/Documents/WestJackson.mdb" ###Set Local variables outFeatureClass = "GridIndex24" polygonWidth = "1000 feet" polygonHeight = "1000 feet" originCoord = "6735482.561 1943416.772" numberRows = "24" numberColumns = "24" ###Execute the Grid Index Features arcpy.GridIndexFeatures_cartography("GridIndex24", "", "", "", "", polygonWidth, polygonHeight, originCoord, numberRows, numberColumns, "")