saving . . . saved Unable to define package has been deleted. Unable to define package has been hidden .
Unable to define package
Title
Question
I followed the tutorial and was able to load the spokenTutorialExamples package that I downloaded from the site. However, when i try to define my own packages by first saving the different classes and then using text editor to insert the 'within' keyword, when I select package.mo in OMEdit, the package loads but does not show the contents of all contained classes. However, the classes are visible when I expand the package and when I click on a particular class, it opens along with the 'within' statement as the first line.

Can you please guide me as to how I can define a package on my own?

OpenModelica Modelica-Packages 8-9 min 20-30 sec 25-02-18, 12:56 a.m. SavinVis

Answers:

Here are the steps to create a new package in OpenModelica:

1. Go to FIle
2. Select New Modelica Class
3. A pop-up window appears
4. Enter Name for the package
5. Under Specialization, select Package from the drop down
6. Click OK

New package will be created.

Now you can create new class/model by following the steps similar as mentioned above. The only additional information is for the field "Insert in class (optional)", click on Browse and select the package inside which you want to create the class.
28-02-18, 4:24 p.m. priyamnayak


Log-in to answer to this question.