New versions of Dymola are released every 6 months , and it can be easy to miss some of the more subtle changes between releases. So, this blog post is all about one such change you may have missed, the differences in the Package and Component Browsers in Dymola 2019 FD01 compared to previous versions and how these could make things a little easier to navigate.
Spot the Difference
When I open Dymola 2019 and Dymola 2019 FD01 side by side, as shown in figure 1, it’s clear to see that changes have been made to the Package and Component Browsers with the addition of new editable fields and buttons. But what do these allow me to do?
Filtering in the Package Browsers
The editable fields at the top of the Package and Component Browsers are actually filter inputs, just start typing in them to start the search.
So, if I wanted to search for all the output connectors in the libraries I have open, I enter output into the filter field for the Package Browser. The filter will take me to the first matching class in the Package Browser; any exact matches are shown first. I can move through all the matches using the up and down arrows while the cursor is still in the filter. If I enter Ctrl+Enter the selected match will be displayed in the modelling window.
It is easier to compare the classes matching my filter if only the matches are shown in the Package Browser. I can do this by selecting the first button to the right of the filter field, as highlighted in figure 2, called Show only matching classes.
The filter is not case sensitive by default. However if I wanted it to be case sensitive, I can right click in the filter field to open its context menu and select the option Match Case.
I can also search for Modelica paths using the filter field. So, if I enter a complete Modelica path into the filter, like Modelica.Blocks.Continuous.PID, it will take me directly to that class (as long as the path exists of course, it can’t work miracles). I can also enter an incomplete Modelica path, such as Modelica.Mechanics.MultiBody.Parts.B , which will filter to anything starting with B in the package Modelica.Mechanics.MultiBody.Parts.
Loading Libraries from the Package Browser Filter
The Package Browser filter field can also be used to load additional libraries, as shown in the video below, which can be very useful. To do this I need to first enable it by going to the Edit menu, then Options…, and in the Package Browser tab select the checkbox next to Filter can automatically load libraries. So, now I can enter VeSyMA.Experiments in to the filter field, the VeSyMA library will be loaded and the Experiments package navigated to.
For this to work, the library being loaded from the Package Browser filter needs to be included in the Modelica Path for Dymola to find it.
Filtering in the Component Browsers
The Component Browser also has a filter field. This filter is used to search through the components in a model; figure 4 shows my search for the revolute in the Modelica Standard Library double pendulum example.
Like the Package Browser filter, I can move between the matching components using the arrow keys. If I use Ctrl+ Enter while a match is selected it is equivalent to using Show Component, and will show the component model in the modelling window. Right clicking in the Component Browser filter field allows me to make the filter case sensitive by selecting the Match Case option in the context menu.
Package and Component Browsers Buttons
The Package and Component Browsers now have buttons controlling how the content is displayed, as highlighted in the image below.
Both the Package and Component Browsers have a sort by button, where I can choose to sort by declaration order defined by the library developer, alphabetical order A to Z or alphabetical order Z to A.
For the Package Browser, there is a button to collapse all the expanded packages.
The Component Browser now has a button to include non-graphical component, which will show/hide variable declarations in the Component Browser.
So the next time you open Dymola, try using the new filter and buttons in the Package and Component Browsers to make finding the model or component you are interested in easier.
Written by: Hannah Hammond-Scott – Modelica Project Leader