To open the dialog box for setting the grid, select Tools → Work Plane, Grid/Snap, Object Snap, Guidelines, or the corresponding button in the toolbar.
In the "Work Plane and Grid/Snap" dialog box, you can define the size of the grid using the number and spacing of the grid points (Image 01).
The orientation of the grid refers to the specified work plane zero point (Image 02), as well as the defined rotation.
If the "Adjust grid of model size" option is active (Image 03), the grid is automatically adjusted to the dimensions of the model.
After confirming the grid settings with "OK", the guidelines are adjusted to the grid (Image 04).