Starting CST DESIGN ENVIRONMENT and opening an MWS window The first step is typically starting the CST DESIGN ENVIRONMENT. The user has access to all CST-specific VBA commands, by means of the Matlab command invoke.Ģ.1. Various operations, like solving several models, performing parameter studies, changing a model, saving or discarding MWS results, etc. This technique has the advantage that it offers complete control of CST MWS from within Matlab. They could as well be entered directly from the Matlab prompt. m file In this case, all the commands that need to be executed in CST, instead of being contained in a VBA. OpenFile("C:\work\test1.cst) Solver.Start SaveĮnd Sub This simple VBA script opens the CST model called test1.cst, starts the solver, saves the model and then exits.Ģ. ProgramFiles\CSTSTUDIO SUITE 2006 and the command file name (including path) is C:\Work\Start_CST.bas the Matlab command line would look like follows: > ! "C:\ProgramFiles\CSTSTUDIO SUITE 2006\CST DESIGN ENVIRONMENT.exe" m C:\Work\Start_CST.bas The contents of the Start_CST.bas file could look as follows: Sub Main Example 1: launch CST, open an existing model, solve, save For example, when CST_DS_Path is At the Matlab command line, enter: > ! "CST_DS_Path\CST DESIGN ENVIRONMENT.exe" m cmdfile.bas where CST_DS_Path is the path to the CST STUDIO SUITE installation directory, and cmdfile.bas is a Basic (VBA) file containing the commands to be executed within CST STUDIO SUITE.ġ.1. It is appropriate when the CST model name and operations to be performed are known in advance and do not need to change. Launch CST from Matlab command line This is the simplest way to run CST from within Matlab. Methods There are two main ways to call CST Studio from within Matlab:ġ) launch CST from Matlab command line and use a separate VBA file to instruct CST what operations to doĢ) run a Matlab.
5Ībstract This application note gives background information on linking CST Studio to Matlab, by calling CST directly from Matlab.įor information on how to call Matlab from within CST Studio, please see the separate Application Note CST_USER_NOTE_MATLAB_COM_DDE.pdf. Example 2: Open an MWS file, perform a parameter study, store a result in a Matlab vector. Example 1 again: launch CST, open an existing model, solve, save. Translating CST-specific VBA commands into Matlab. Starting CST DESIGN ENVIRONMENT and opening an MWS window. Example 1: launch CST, open an existing model, solve, save. Application Note Calling CST Studio from Matlab Abstract.