AnyLogic
Expand
Font size

Renaming model elements

The goal of renaming support is to allow for improving your model without changing its behavior. When you rename one model element, your goal is to make a model-wide change without affecting the semantic behavior of the system.

Use the Rename feature to rename the selected element and correct all references to the element in the whole model. AnyLogic manages the renaming for you automatically.

AnyLogic optionally allows you to preview all the impending results of a renaming action before you finally choose to carry it out.

To rename a model element and all references to this element in the model

  1. Right-click (macOS: Ctrl + click) the model element in the Projects view and choose Rename... from the popup menu.
  2. This will open Rename... dialog box. Type a new name for the model element in the New Name field.
  3. If you want to preview all the impending results of a renaming action, leave the Preview changes checkbox selected.
  4. Click Rename when finished.
  5. If you left the Preview changes checkbox selected, the Operation results preview dialog will be shown.

  6. In the Changes to be performed list, select references to the element that you actually want to rename.
  7. Click OK when finished to commit changes.

Renaming without dialog

You can rename a model element and all references to it in the model without showing a dialog. This can be enabled and disabled on the Development preference page. If enabled, then the new name for a model element can be typed into the editor when the rename refactoring is invoked.

In-place smart renaming

Alternatively, you can rename the element and all references to it throughout the model right from the element's Name property.

To perform in-place smart renaming

  1. In the element's Name property, change the name to a new one.
    Do not click anywhere outside the Name field or change the focus by any other means.
  2. Press Ctrl + Enter.
  3. If the Preview rename results default preference has not been changed, you will see the Operation results preview dialog showing you the potential changes. Select the changes you confirm as described above. Click OK when finished.
  4. If not, all the references to this element will be automatically renamed without additional confirmation.
How can we improve this article?