FlexSim versions 7.7 through 17.1.2 have a bug where renaming a user command via the right-click menu replaces the code of the user command with the name being used for renaming. Here are the steps to reproduce it:
- Open FlexSim
- Create a new model
- Create a new user command
- Click on the code editor icon for the user command
- Add some code, such as "int test = 1;"
- Click "OK" to close the code editor window
- Click "Close" to close the user command properties window
- In the Toolbox, right-click on the user command and select "Rename"
- Give the user command a different name, such as "renamed_command" and press Enter
- In the Toolbox, right-click on the user command and select "Edit code"
- Note how the "int test = 1;" code has been replaced with the new name
I am emailing this to [email protected] as well, but wanted to share it here so that other users are aware of the issue and are able to avoid it until the bug is corrected. A good workaround is to open the properties window for a user command and rename it through there instead.