I have the following code to try to create a grid index. I want to be able to add in a scale field. However, whatever layout I have open, it doesn't seem to be picking up the page units. It ends up creating one huge index page (over 70 miles in height)
Layer = arcpy.GetParameterAsText(0)
Scale = arcpy.GetParameterAsText(1)
out_location = arcpy.GetParameterAsText(2)
arcpy.cartography.GridIndexFeatures(out_feature_class=out_location+"//index", in_features=Layer, use_page_unit="USEPAGEUNIT", polygon_width = "9.88", polygon_height= "13.62", scale = Scale, intersect_feature = "INTERSECTFEATURE")
Have you read the usage section of the tool help? That explains how the tool functions under what scenarios.