Model Builder Methods for Use in Add-ins
For writing add-in method code that operates on the current component, current mesh, current physics, and so on, use the methods in the table below.
Returns an object of the type ModelNode for the current component.
Returns an object of the type MeshSequence for the current mesh.
Returns an object of the type ModelEntity for the current component.
Returns an object of the type Physics for the current physics interface.
Returns an object of the type ResultFeature for the current component.
Returns an object of the type Study for the current component.
These methods return the corresponding entity such that the method code in an add-in can operate on it. When called from an application a method in this category returns null. Also, null is returned if no entity of the corresponding type exists such that nothing is current.
General utility methods for writing methods for add-ins are listed in the table below.
Creates a Settings Form node with the given tag based on the Form Definition node with the given name definition. The Form Definition must be configured to show as Settings form.
Creates a Method Call node with the given tag based on the Method Definition node with the given name definition. The Method Definition must be configured to use as Method call.
To learn more about using these methods you can review the Application Builder settings for one of the built-in add-ins by opening the corresponding MPH file. In a typical Windows® installation the built-in add-in library is located at
C:\Program Files\COMSOL\COMSOL64\COMSOL_Multiphysics\addins