Loudspeaker analysis -- Automation
In this gallery page, we will show five examples that use scripting to analyze loudspeakers:
- The first example is a script written in VBscript and runs directly from MagNet -- the input data is programmed in the script itself.
- The second still runs from MagNet but uses a scripting form for parameter input. <;>The third is a program written in Excel and VBA, and shows how the user can control MagNet from an external application, such as Excel or MATLAB.
- The last two examples (4a and 4b)show a Visual Basic program that provides its own interface and runs MagNet in the background. The program extracts the data from MagNet and displays the results in its own display window.
Examples
|
| Click image to see full size version |
|
| Click image to see full size version |
The underlying program uses the same program code, as in example #1, to generate the final model.
|
| Click image to see full size version |
To build the speaker model with this spreadsheet, the user enters the data in the appropriate cells, and then clicks the “Build Loudspeaker” button to build the geometry.
|
| Click image to see full size version |
This type of application of scripting is particularly useful when the program designer wants to build a program that acts as a shell over the MagNet program. All of the user interaction in that case is done through the program interface, thereby “hiding” the actual finite element analysis.
The results of selecting the "Build Loudspeaker" button are shown here.
|
| Click image to see full size version |


