Locking shapes

Sometimes you may need to lock a presentation shape so that it could not be selected in the graphical editor by a mouse click, and model developers would not have a chance to move it, resize, or modify its properties anyhow.

It is frequently needed when you have some background image on the presentation (e.g. a layout of a factory or a hospital department), used as a base for your animation. In this case when editing some shape laying over your layout you may accidentally edit the layout itself (e.g move it aside) thereof sometimes it is hard to click exactly on the shape border and you may select the background image instead of the shape you need. 

AnyLogic allows users to lock presentation shapes. Locked shapes do not react to mouse clicks - it is impossible to select them in the graphical editor until you unlock them. As for the described example, locking your background image will significantly simplify editing animation as you will not be able to select the layout by inaccurate mouse click.

 To lock a shape

  1. Select the shape in the graphical editor or in the Projects view 
  2. Select the Lock checkbox in the Properties of this shape.

 To unlock a shape

  1. Select the shape in the Projects view.
  2. Clear the Lock checkbox in Properties of this shape.

To unlock all shapes

  1. Right-click (Mac OS: Ctrl+click) the empty space in the graphical editor and choose Locking > Unlock all shapes from the popup menu.
    This will unlock all shapes located on the currently active presentation diagram.