Is there a way to calculate number of rows and columns in Python for Grid Index Features tool?

248
0
07-24-2019 11:30 AM
JorgeGarcia-Iniguez
New Contributor

I am trying to use the Grid Index Features to generate a grid based on scale and extent.  I want to dynamically determine the number of rows and columns, just like the tool dialog does.  Is there anyway to calculate these values dynamically based on the extent and scale?

Grid Index Features dialog

Here is the Python code I am trying to use.  However, no matter what I try, the number of rows and columns defaults to 10.


    arcpy.GridIndexFeatures_cartography(Grid_Index_FC, Buffered_Extent_FC,
        intersect_feature="NO_INTERSECTFEATURE", use_page_unit="USEPAGEUNIT",
        scale=2000, polygon_width="4 Inches", polygon_height="4 Inches",
        #origin_coord=orig_coord,
        #number_rows="", number_columns="",
        starting_page_number="1", label_from_origin="NO_LABELFROMORIGIN")
Tags (1)
0 Kudos
0 Replies