Application Builder Updates
For users of the Application Builder, COMSOL Multiphysics® version 5.3a brings data access for physics interface nodes; a better toolbar for apps used in browsers; as well as numerous improvements to form objects, the Form Editor, and the Method Editor. Read about all of the Application Builder updates in detail below.
Improved Toolbar for Applications in a Web Browser
When running an app in a web browser, the main toolbar has an improved user interface with more options for customization. You can now include text, for buttons and sections, as well as both large and small buttons. This improvement has also been included for apps running in the COMSOL Multiphysics® software on the Linux® operating system and macOS.
Data Access for the Physics Interface Level
The Data Access functionality, which makes Model Builder and Application Builder settings available in Application Builder form objects, is now available for many of the settings in the top-level physics interface nodes.
Form Editor Updates
There are a number of improvements to various form objects:
- Toolbar buttons can have both icons and text, and can be made either large or small
- Toggle items can be added to Toolbar, Table, and Graphics form objects
- Radio buttons have an Orientation setting to make the list either vertical (default) or horizontal (new)
- Button and Toggle Button form objects have a Manual height option to customize the height of the button
- The new Trigger while dragging option for Slider form objects makes it possible to only receive the OnDataChange event when the app user finishes dragging the slider thumb; this is useful if the OnDataChange method does something relatively slow that you only want to perform once, such as building a complex geometry
- Boolean expressions such as a < b can be used in Command Sequences when setting Boolean properties and declarations
- Table form objects can be added as inputs for array and matrix properties directly from the Editor Tools window, using the Data Access functionality; previously, you would have had to manually create the table
There are also several improvements to the Form Editor:
- The drag-and-drop functionality supports copying by holding the "Ctrl" key when clicking to grab the selected items, and works for both Grid and Sketch mode
- Grid mode supports dragging a selection box to select multiple cells and is applied when you start dragging either in an empty cell or outside the grid
- For Sketch mode, holding the "shift" key while dragging to select now adds to the current selection, whereas previously, a new selection would be created
- The interface for entering matrix arguments is improved; it is used, for example, when defining default values for arbitrarily large 2D arrays
Method Editor Updates
To help you edit method code, you can now easily comment or comment out selected lines in the Method Editor using the new Toggle Comment command, by right-clicking on selected lines of text or using the associated keyboard shortcut, Ctrl+7. Additionally, there are several new built-in methods, such as
getComsolVersion to retrieve the current software version as a string, and
createDirectory to create file directories. In addition, some methods have been updated to support more data types and options, including
useGraphics, which now supports clearing Graphics form objects, and
error, which supports wrapping COMSOL Multiphysics® errors, providing richer custom error messages.