AnyLogic
Expand
Font size

Diagram grid

The graphical editor diagram can display a grid, which supports snapping elements to it and simplifies arranging and aligning shapes. By default, the grid is shown and snapping elements to the grid is enabled.

At 100% zoom, grid cells are squares of 10*10 pixels. When moving or resizing a shape with the grid enabled, the corresponding shape’s properties (coordinates, width, height, etc.) change discretely with the step of 10 pixels. This can be helpful, e.g. when you need to draw shapes with the same dimensions, or place them precisely opposite one another.

Changing the zoom level affects the grid step. For example, at 200% zoom the grid step is 5 pixels, and at 800% the grid step is 1 pixel.

To show or hide the grid

  1. Click the Show/Hide Grid toolbar button.
    When the grid is shown, the button appears pressed.

Hiding the grid does not affect snapping shapes to it, i.e. if the grid is enabled but not shown, shapes still snap to the grid.

To enable or disable the grid

  1. Click the Enable/Disable Grid  toolbar button.
    When the grid is enabled, the button appears pressed.

To move a shape without snapping it to the grid

  1. Press and hold the Alt key (macOS: Option key) while dragging the shape, or
    Press and hold the Alt key (macOS: Option key) and use the arrow keys to move the shape.
How can we improve this article?