Application Builder Updates

For users of the Application Builder, COMSOL Multiphysics® version 6.0 brings an improved debugger in the Method Editor, a new Main Window Editor, as well as data validation and Form Editor improvements. Read more about these updates below.

Improved Debugger

With the new debugger in the Method Editor, you can inspect, and even change, the values of variables and declarations while debugging. Breakpoints have also been extended and can now be disabled individually, while the new Breakpoints window gives easy access and overview of all breakpoints. The COMSOL Desktop® is no longer blocked when you stop at a breakpoint, making it possible to inspect the current state of the application. For example, when stopped in a model method, you can click around in the Model Builder tree to see the updated settings of the model.

There are also several other improvements, for example:

  • The Call Stack window lets you inspect the current call stack.
  • There is a new Break button for suspending method executions.
  • You can now Step out of the current method.
  • Methods run in a separate process. This prevents bugs that you might have introduced in methods (for example, crashes from custom native libraries) from interfering with the regular COMSOL Desktop® during development.
The Application Builder UI showing the Method Editor and the Variables window on the right. The Method Editor stopped at a breakpoint in the Tuning Fork app. The Variables window to the right shows the values of the parameters in the model, as well as declarations, local variables, and Data Access-enabled settings. Values can also be changed directly in the Variables window, as the highlighted row shows.

Main Window Editor

The new Main Window Editor works similarly to the Form Editor, but for the ribbon, menu bar, and main toolbar of the app. These user interface components were previously only editable from the Application Builder tree. Just as the Form Editor, the Main Window Editor provides a graphical user interface with a visual representation of the objects, and allows you to move them around freely by using the mouse to drag them. The Editor Tools window is also supported by the Main Window Editor, allowing you to quickly add items for common options, similar to the New Form Wizard.

Gauge Form Object

The new Gauge form object is similar to the Knob form object but is read-only and used to display a value by the position of a needle or arrow of a gauge. Optional tick marks and labels can be added to indicate the range of values that the gauge can display. In addition to tick marks and labels, you can optionally configure a set of color scales to further indicate the values, as shown in the figure below.

Data Validation

There are several improvements for validation of inputs and providing good error messages when a user enters an invalid input in your apps. Numerical validation in input fields now supports Greater than and Less than (in addition to Greater than or equal and Less than or equal). In addition to parameters, you can also use declaration variables in the comparison.

Error messages support variables through the new eval method, allowing for richer validation error messages to the user of an app. Supported variables include the current value, parameters, declarations, and the current lower or upper bound.

Advanced error checking that requires writing a method has also become easier, as you can now access both the old and new value in an input field, or other form object, directly in the method.

Flexible Events

Events on form objects, such as On data change now support command sequences, just as what was previously available for buttons and other form objects. This also makes it possible to pass arguments to methods, making it easier to reuse methods across multiple form objects.

Icon Library

There are a number of new icons available, specifically designed to be useful in app development. The categories include general functionality such as navigation and status icons, as well as model-related categories like physics and plot types. Many of the icons also come in multiple colors.

The File Explorer window showing icons for the general category in blue. Some of the icons in the general category, here showing the blue versions.

Form Editor

There are a number of additions to the form editor:

  • Form collections support hiding of their individual forms, for example, tabs or sections. This allows for more flexibility in app design, such as only showing results-related tabs after the model has been solved.
  • Graphics form objects used for animations now show buttons for playing, stopping, and stepping in the Graphics toolbar.
  • There is a new look for buttons, outlined, available for both large and small buttons.
  • It is now possible to simultaneously show the icon and text for small buttons.
  • Toggle buttons and items have built-in support for radio button behavior by using String declarations as source. This is useful for presenting options as toggle buttons, but where only one can be selected at a time.
  • There is more flexibility for controlling where scrollbars appear with the new Prefer inner scrollbars setting.

39475ef72c1bbb42416432aec928aa32

8e2e1772527afbd40ebcbac80a867ce0

66588dcd45c4b1598b5fdc7004d70791

New Utility Methods

New built-in utility methods in the Method Editor:

  • The method goToView makes it possible to switch to one of the standard views, "xy", "xz", "yx", etc., in a graphics form object.
  • The methods clearLog and clearMessageLog clear the contents of Log and Message Log windows.

New Application

COMSOL Multiphysics® version 6.0 brings one new example application.

Curve Digitizer

e05a6425ce0b85dd7303806a4b3a4cc5
Application Library Title:
curve_digitizer
Download from the Application Gallery