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. 

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

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 (Mac OS: 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 check box selected.
  4. Click Rename when finished.
  5. If you left the Preview changes check box selected, the Operation results preview dialog will be shown. 

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

Renaming without dialog

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

You can also do it by removing the selection from Always preview the results check box in the Operation results preview dialog window.


Related topics

Operation results preview dialog