The Method contextual ribbon toolbar provides access to most of the functionality for creating, editing, and debugging methods. It is available when a method editor window is active. This section briefly describes the buttons on the Method toolbar.
• Click the Model Builder button () to switch from the Application Builder to the Model Builder windows and the standard COMSOL Desktop.
• Click the New Form button () to create a new form using the New Form wizard. See Working with a Form and Using the New Form Wizard.
• Click the New Method button () to create a new Method node in the model and open its code in a new editor tab. See The Method Nodes and Method Editor Windows.
• Click the Record a New Method button () to create a new method start a recording session of operations on the embedded model that you can later use as code in that method. When the recording starts, the button changes to the Stop Recording button (
), which you click to end the recording. See Recording Code.
•
• Click the Preview button () to show or hide the Preview window for a live preview of the forms and methods in the application. In the Preview window you can scroll to get a preview of all forms and methods in the application, which can be useful, for example, if you are working on a method that interacts with a form. To show a preview of a form in the Preview window, select a form or method node in the Application Builder window.
• Click the Editor Tools button () to show or hide the Editor Tools window, where you can choose common COMSOL Multiphysics model operations and insert them into a method or generate form objects based on them. See Adding Model Code and Form Objects.
• Click the Utility Class button () to create a new Utility Class node in the model and open its code in a new editor tab. See The Utility Class Node.
• Click the External Java Library button () to create a new External Java Library node in the model. See The External Java Library Node.
• Click the External C Library button () to create a new External C Library node in the model. See The External C Library Node.
The Edit section contains the following button:
• Click the Revert to Saved button () to discard the changes made since the method was last saved and revert to the saved version.
• Click the Language Elements button () to show or hide the Language Elements window, where you can choose and insert language elements into a method. See Adding Language Elements.
• Click the Model Expressions button () to show or hide the Model Expression window, where you can choose and insert COMSOL Multiphysics model expressions into a method. See Adding Model Expressions.
• Click the Check Syntax button () to check the syntax for all of the methods that you have created. Syntax errors and warnings in the methods appear in the Errors and Warnings window. See The Errors and Warnings Window.
• Click the Go to Node button () to move to the node in the embedded model that corresponds to a model entity in the selected source code. See Going to Node the Source Code is Mapped To.
• Click the Record Code button () to start a recording session of operations on the embedded model that you can later use as code in a method. When the recording starts, the button changes to the Stop Recording button (
), which you click to end the recording. See Recording Code.
• Click the Extract Variable button () to extract a local member field variable to replace an expression of a certain form. See Extracting Variables.
•
•
•
•
•
•
•
• Click the Test Application button () to launch the application in a separate window so that you can test it. See Testing the Application.
• Click the Apply Changes button () to compile and apply code changes to the running application (so-called hot code swap). See Applying Changes to a Running Application.
• Click the Test in Web Browser button () to test run the application in a web browser. See Testing the Application.
The View section contains buttons for rearranging the views in the Application Builder desktop window.
•
•