Grid Lines ImageLength/Width (in inches): The size of the squares on the grid IN INCHES (NOT the current units).
Grid Lines (in inches): Displays a grid line every n units.
Subdivisions: The number of divisions between major grid lines.
Set Grid Lines: Execute the script and apply the above settings to the grid.