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
- Right-click (macOS: Ctrl + click) the model element in the Projects view and choose Rename... from the popup menu.
- This will open Rename... dialog box. Type a new name for the model element in the New Name field.
- If you want to preview all the impending results of a renaming action, leave the Preview changes checkbox selected.
- Click Rename when finished.
- If you left the Preview changes checkbox selected, the Operation results preview dialog will be shown.
- In the Changes to be performed list, select references to the element that you actually want to rename.
- Click OK when finished to commit changes.
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.
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
- 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.
- Press Ctrl + Enter.
- 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.
- If not, all the references to this element will be automatically renamed without additional confirmation.
How can we improve this article?