openmodelica

Changeable component name in modelica


I am attempting to use openmodelica to simulate a process plants.

The general method I will be following is to create class type model of the different units and drag and drop these units in OMEdit.

The problem is that I can't find an easy way to change the defaultComponentName of each component except by changing it in the code. This is not bad for small systems but for larger systems it may become tedious to search for the new component and change it's name.

Ideally I would like to double click on the component and change it's name in the component parameters window that opens. This will make it a lot easier to use especially for my collages that are not familiar with coding.

To illustrate my point see the diagram below: enter image description here

Instead of the name Tank and Tank 1 I need them to reflect their actual plant names eg TK-001 and SU-100


Solution

  • Right click on the icon in the diagram and select Attributes.