Versions that use the GitHub default branch cannot be downloaded
1.2.22
add InstallMacroScript for installing macros when CST_App fails to do so correctly
1.2.21
application.2019 to application
1.2.20
Fix addNormalMaterial so tanD and tanDM values can be added correctly
1.2.19
Remove command forcing CST to open 2019 version
1.2.18
Bug Fix for getSParams causing an error when only one parametric sweep had been simulated.
1.2.17
Bug Fixes, New Booleon Methods
1.2.16
Added support for retrieving s-parameter results from parametric sweeps using the method getSParams. Old method getSParameters still works as previous version but only outputs results from runID = 0. See example ManagingSParameters.m for more info.
1.2.15
Updated definition of background material in class creator to stop it setting it as something other than a vacuum by default. New methodto set background to other "normal" or "pec" materials. Add options for tand and sigma for normal materials.
1.2.14
Bug fix in dipole example,
New method getEFieldVectorAll returns EField from all mesh points in hexahederal mesh (time domain) simulations
1.2.13
I believe getEFieldVector is now returning the correct field and coordinate values in all planes. Examples to be updated...
1.2.12
Bug fix to getEFieldVector for y-z and x-z planes. A few other bug fixes that hopefully haven't effected other functionality, but not fully tested.
1.2.11
Fixed issue opening existing CST files
getFieldIDStrings outputs farfield strings which can be directly input as ffid into getFarField
New functions for plotting 3D patterns
getEFieldVector returns X,Y,Z grids so field can be plotted with 'surf'
1.2.10.3
New Image Icon
1.2.10.2
change image icon
1.2.10.1
Updated image
1.2.10
Changed image icon
1.2.9
Bug fixes, improvement/changes to some methods and examples.
getEFieldVector now returns X,Y,Z coordinate points in matrices that can readily be used to plot the field in a surface plot.
1.2.8
Removed 'ports' property as this was unused. Tidied up code. Updated examples. Minor bug fixes. Changed input arg list for rotateObject method but will still work with old input argument list.
1.2.7
Significant improvements to plotting simulation setup in Matlab plot windows including plotting all objects in the same colors that they appear in the CST session. Macros will be installed locally, most likely into the app_data folder.
1.2.6
Updates: Extensive support for using parameters when building CST models. You should be able to use parameters to build all types of objects as the x/y values. Does not support expressions which include parameters.
New Example: AssignParameters.m
1.2.5
New Method: getPortSignals - read port signals into Matlab
1.2.4
Improvements and bug fixes to plotting simulation setup in matlab
1.2.3
New Functionality: - draw the CST simulation setup directly into Matlab axes by importing a specific CST solid or surface (in components) and plotting as surface object in Matlab
Method: drawObjectMatlab
Example: DrawSimulationSetupInMatlab.m
1.2.2
Bug fixes and minor improvements
1.2.1
Main Updates: Turn auto updating off and let Matlab send a long list of commands to CST so building can be done all at once. See 'BuildAtOnceExample.m'
New methods: deleteObject, addToHistory, update, setUpdateStatus, mergeCommonSolids
1.1.6
Improved file handling: CST = CST_MicrowaveStudio(); with no input parameters will return an object which is associated with the currently active mws project.
Improved handling of port numbers. All new ports will always be numbered consecutively.
1.1.5
Updates to CST_Microwave studio with some new functionality.
New Methods:
addPolygonBlock3D
connectFaces
addComponent
translateComponent
New Example:
SinusoidSurface
1.1.4
Added new functionality for handling parameters:
addParameter
changeParameterValue
isParameter
parameterUpdate
getParameterValue
1.1.3
New Method: getFieldIDStrings to return strings needed for getFarField and getEFieldVector
New Function: plot3Dmeshgrid for plotting the hetrahederal mesh used in TD solver in a matlab window
Bug fixes to example files
1.1.2
New method getMeshInfo
Extra example use in Examples/dipole.m.
Update to defineUnits so user can modify project
Bug fix so a CST_MicrowaveStudio object will be correctly created when a file already open in CST is passed as the input argument
1.1.0.1
Added method getEFieldVector to return the electric field value from e-field monitor for a simulation performed using the time domain solver and hexahedral mesh. Updates and bug fix in the Examples\dipole.m file
Use to programmatically control the commercial EM solver, CST Microwave Studio, through MATLAB.
FEATURES:
- Build and run complex simulation problems in CST Microwave Studio programatically from MATLAB
- Build complex geometries in the CST from MATLAB scripts
- Directly import results from CST into MATLAB for analysis and plotting
- Visualize CST Simulation setup in MATLAB figures.
See Examples for different ways software can be used. Created and tested in MATLAB R2018a but should work with recent versions (at least from R2017a). Will only work on Windows Platform as uses actxserver as a COM server to CST. Should work with all latest versions of CST (tested with 2017-2019).
Cite As
Henry Giddens (2021). hgiddenss/CST_App (https://github.com/hgiddenss/CST_App), GitHub.
Retrieved .
Hi Dr Henry,
Please, I am trying to convert my 1D and 2D rough surface models developed in MATLAB to CST,
I have tried to develop these models in CST, but to no avail, therefore I would like you to assist me with the conversion of these MATLAB models to CST
Thanks
Elijah
Hi,
I have to assign an inhomogeneous permittivity profile for a rectangular object.
In MATLAB, I can create an inhomogeneous profile through a parametric model and assign it to each central grid point. And can save the grid location and value in ".txt file".
Now, Is it possible to assign this permittivity map or profile in CST by using your function?
Hi Henry,
Thanks a lot for your answer, It was really helpful. I've sent you an email with some questions. I'll really appreciate your assitance
Nicole
Hi Nicole,
I don't know if you are aware, but you can do this in CST manually - once you have run your simulation and calculated the far-field pattern, under the far-field tab there is a button called "Array Factor" in the top left of the window. This allows you to calculate the array pattern based on element spacing and phase shift. If you set this up before you run your simulation, it should always show the calculated array pattern. You could also do this yourself in matlab by reading the far-field pattern for a single element and then calculating the array factor for your array - you can see the equations required for this (for regular, rectangular arrays) by clicking on the help button in the Array Factor box.
If you are wondering whether it is possible to control the CST array factor calculation from Matlab, then yes it is, you just need to work out the correct VBA commands and execute them in CST. However, as I prefer to work in Matlab I haven't implemented this in the code. If I wanted to know the array pattern then I would read in the pattern for the single element and calculate the overall array pattern from the theory. If you need any further assistance then please feel free to email me h.giddens@qmul.ac.uk
Hi, thank you it was really useful.
I am currently working on the design of antenna arrays, is there any way to control the postprocessing options to combine the farfield radiation diagrams of the individual elements to get the array pattern?
Thanks, henry for the reply. I was actually making a reflectarray design. Which at the end I got successful. A reflectarray has typically some fixed interelement distance and different geometric size based on a phased gradient. With the help of the code, I could generate square patches with a certain inter-element distance among them. With each loop the required geometric size based on calculated phases is also generated at the same time.
What I actually meant earlier was the code generates square patch geometry. If I want to generate e.g. a Hexagonal patch or semi circle geometry with some stubs coming out of the patch. How do you think should I approach the problem.
Hi Henry,
thank you very much for the quick answer! I have used CST.save; CST.quit; without CST.closeProject;. I think that was my problem. (I am using CST 2019 as well and I also found no option to turn off that dialogue.)
Thank you very much again!!
Hi Frauke,
I dont seem to get this problem when I am working (Using the latest version of this code and CST 2019), as long as I have saved the project file, and in that case the prompt only asks that I want to save the file. It could be a setting in CST, but I couldnt find anything when i looked through the preferences. Have you tried the following sequence? CST.save; CST.closeProject; CST.quit; If not, you can try asking CST support whether there is a way to turn off that dialogue
Hi,
thank you very much this has helped to speed up my work a lot!
I have one question though. Is there a way to automatically close the "Do you really want to quit the application?" dialogue from CST? This comes up sometimes after quitting CST from Matlab and it stops the script until I press yes manually. The dialogue also appears, if I saved the cst file before quitting.
Thank you again!!
I don't think it will be too difficult to add different dimension patch objects into the CST file, however it is difficult for me to help without being able to see your code. Feel free to send me a PM with more information
I found the interface quite useful. I was able to export some metasurface based geometry to CST using this interface. I was designing a reflectarray which requires arbitary patch dimensions and different spacing as well. It was very hard for me to play with geometry in the matlab code. As the inter-patch distance in the code is fixed. I couldnt figure out a way to put my own calculated patch dimensions in the code.
If you type "methods CST_MicrowaveStudio" the "addWaveguidePort" method should be in the list? Note that to call it then you have to have an instance of of the CST_MicrowaveStudio class saved in the workspace. e.g: CST = CST_MicrowaveStudio; CST.addWaveguidePort('zmax',(0 5),(0 10), 5);
Yes, that was the intended behavior. Every time you create a new project CST adds a load of new files in a temporary directory and I wanted to avoid clogging up my hard drive unless the project is manually saved. In this way the software at least behavior mirrors the way in which you would use the GUI.
Hello Henry! Thanks again for this amazing job. While looking for the addWaveguidePort method, my matlab says "The class CST_MicrowaveStudio has no Constant property or Static method named 'addWaveguidePort'.". However that is not a problem, with your other functions as a reference I will try to create it myself :).
On the other hand, I have been playing around a little bit with the examples. If I understood them right, when creating a new non-existent CST project, the file is saved in the current working directory. However, this does not happen for me (CST 2019). The file is not saved, but rather it stays as "untitled" until I save it manually. Is that the intended behavior?
Hi Jesus, Yes you can create waveguide ports using the addWaveguidePort method (type help CST_MicrowaveStudio.addWaveguidePort for help guidelines), and you can open existing cst files without affecting the history list, then add new entries and it wont be overwritten. To open an existing file just run CST= CST_MicrowaveStudio(folder,[filename,'.cst']), and the existing file should open.
Amazing stuff! Thank you for uploading this. I have two questions about it.
- Is it possible to create waveguide ports? I have been looking for the function for it, but did not see it.
- Does with work with already created CST files. Meaning, if there is already a history list it will add new entries, instead of overwriting them.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Excellent work!
Please add a 'getting post-processing' function.Thanks!
Alright Dr. Henry,
Thank you for your support.
I have emailed you with more details.
Many thanks
Elijah
Hi Elija, Please feel free to email me with more details of your problem (h.giddens@qmul.ac.uk)
Hi Dr Henry,
Please, I am trying to convert my 1D and 2D rough surface models developed in MATLAB to CST,
I have tried to develop these models in CST, but to no avail, therefore I would like you to assist me with the conversion of these MATLAB models to CST
Thanks
Elijah
Hi Dr. Henry,
I sent you a mail describing my problem, can you please look into it please.
Hi Dr. Henry,
I sent you a mail describing my problem, can you please look into it
Hi,
I have to assign an inhomogeneous permittivity profile for a rectangular object.
In MATLAB, I can create an inhomogeneous profile through a parametric model and assign it to each central grid point. And can save the grid location and value in ".txt file".
Now, Is it possible to assign this permittivity map or profile in CST by using your function?
Hi Henry,
Thanks a lot for your answer, It was really helpful. I've sent you an email with some questions. I'll really appreciate your assitance
Nicole
Hi Nicole,
I don't know if you are aware, but you can do this in CST manually - once you have run your simulation and calculated the far-field pattern, under the far-field tab there is a button called "Array Factor" in the top left of the window. This allows you to calculate the array pattern based on element spacing and phase shift. If you set this up before you run your simulation, it should always show the calculated array pattern. You could also do this yourself in matlab by reading the far-field pattern for a single element and then calculating the array factor for your array - you can see the equations required for this (for regular, rectangular arrays) by clicking on the help button in the Array Factor box.
If you are wondering whether it is possible to control the CST array factor calculation from Matlab, then yes it is, you just need to work out the correct VBA commands and execute them in CST. However, as I prefer to work in Matlab I haven't implemented this in the code. If I wanted to know the array pattern then I would read in the pattern for the single element and calculate the overall array pattern from the theory. If you need any further assistance then please feel free to email me h.giddens@qmul.ac.uk
Henry
Hi, thank you it was really useful.
I am currently working on the design of antenna arrays, is there any way to control the postprocessing options to combine the farfield radiation diagrams of the individual elements to get the array pattern?
I have sent you an email with some description of the problem.
Hi Jalil, I can give you some help with your problem if you send me an email: h.giddens@qmul.ac.uk
Thanks, henry for the reply. I was actually making a reflectarray design. Which at the end I got successful. A reflectarray has typically some fixed interelement distance and different geometric size based on a phased gradient. With the help of the code, I could generate square patches with a certain inter-element distance among them. With each loop the required geometric size based on calculated phases is also generated at the same time.
What I actually meant earlier was the code generates square patch geometry. If I want to generate e.g. a Hexagonal patch or semi circle geometry with some stubs coming out of the patch. How do you think should I approach the problem.
Hi Henry,
thank you very much for the quick answer! I have used CST.save; CST.quit; without CST.closeProject;. I think that was my problem. (I am using CST 2019 as well and I also found no option to turn off that dialogue.)
Thank you very much again!!
Hi Frauke,
I dont seem to get this problem when I am working (Using the latest version of this code and CST 2019), as long as I have saved the project file, and in that case the prompt only asks that I want to save the file. It could be a setting in CST, but I couldnt find anything when i looked through the preferences. Have you tried the following sequence? CST.save; CST.closeProject; CST.quit; If not, you can try asking CST support whether there is a way to turn off that dialogue
Hi,
thank you very much this has helped to speed up my work a lot!
I have one question though. Is there a way to automatically close the "Do you really want to quit the application?" dialogue from CST? This comes up sometimes after quitting CST from Matlab and it stops the script until I press yes manually. The dialogue also appears, if I saved the cst file before quitting.
Thank you again!!
Hi jalil
I don't think it will be too difficult to add different dimension patch objects into the CST file, however it is difficult for me to help without being able to see your code. Feel free to send me a PM with more information
Dear Giddens
I found the interface quite useful. I was able to export some metasurface based geometry to CST using this interface. I was designing a reflectarray which requires arbitary patch dimensions and different spacing as well. It was very hard for me to play with geometry in the matlab code. As the inter-patch distance in the code is fixed. I couldnt figure out a way to put my own calculated patch dimensions in the code.
Yes, I just found it. Thanks and sorry for the confusion!
If you type "methods CST_MicrowaveStudio" the "addWaveguidePort" method should be in the list? Note that to call it then you have to have an instance of of the CST_MicrowaveStudio class saved in the workspace. e.g: CST = CST_MicrowaveStudio; CST.addWaveguidePort('zmax',(0 5),(0 10), 5);
Yes, that was the intended behavior. Every time you create a new project CST adds a load of new files in a temporary directory and I wanted to avoid clogging up my hard drive unless the project is manually saved. In this way the software at least behavior mirrors the way in which you would use the GUI.
Hello Henry! Thanks again for this amazing job. While looking for the addWaveguidePort method, my matlab says "The class CST_MicrowaveStudio has no Constant property or Static method named 'addWaveguidePort'.". However that is not a problem, with your other functions as a reference I will try to create it myself :).
On the other hand, I have been playing around a little bit with the examples. If I understood them right, when creating a new non-existent CST project, the file is saved in the current working directory. However, this does not happen for me (CST 2019). The file is not saved, but rather it stays as "untitled" until I save it manually. Is that the intended behavior?
Hi Jesus, Yes you can create waveguide ports using the addWaveguidePort method (type help CST_MicrowaveStudio.addWaveguidePort for help guidelines), and you can open existing cst files without affecting the history list, then add new entries and it wont be overwritten. To open an existing file just run CST= CST_MicrowaveStudio(folder,[filename,'.cst']), and the existing file should open.
Amazing stuff! Thank you for uploading this. I have two questions about it.
- Is it possible to create waveguide ports? I have been looking for the function for it, but did not see it.
- Does with work with already created CST files. Meaning, if there is already a history list it will add new entries, instead of overwriting them.
Again, amazing job and thank you very much!