CST DESIGN STUDIO VBA Objects

A CST MICROWAVE STUDIO project offers an associated CST DESIGN STUDIO canvas where the model can be connected to additional components to simulate a system built with this model. However, you can also modify the canvas' contents and the circuit simulation settings by VBA as the required CST DESIGN STUDIO commands are available in addition to the CST MICROWAVE STUDIO VBA command set.

The access of the CST DESIGN STUDIO follows simple rules that will be presented below. To obtain an overview over all commands available there, please refer to the CST DESIGN STUDIO VBA help.

 

Rule No.1:  Global CST DESIGN STUDIO objects are accessed through the extension "DS"
Note that CST MICROWAVE STUDIO and CST DESIGN STUDIO both provide a project object whose methods can be directly accessed in the built-in VBA interpreter as the object is defined in the main scope. Furthermore, both project objects provide - for the sake of consistence - methods with identical names, e.g. "StoreParameter". To ensure non-ambiguous access to these methods, the methods of the global CST DESIGN STUDIO objects are moved to the "DS" scope.

For instance:
StoreParameter ( "a", "1.0" ) calls the  CST MICROWAVE STUDIO project's method, whereas
DS.StoreParameter ( "a", "1.0" ) calls the  CST DESIGN STUDIO project's method.

 

Rule No.2: CST DESIGN STUDIO objects with ambiguous extensions are accessed through these extension plus the prefix "DS"
Rule No.2 is very similar to rule No.1 but concerns other objects than global objects. For instance, both projects provide an parameter sweep object that is originally accessed through the extension "ParameterSweep". The ambiguity is resolved by moving the CST DESIGN STUDIO object again. Use "DS" plus original extension to access the CST DESIGN STUDIO object:

ParameterSweep.DeleteAllSequences calls the CST MICROWAVE STUDIO sweep's method, whereas
DSParameterSweep.DeleteAllSequences calls the CST DESIGN STUDIO sweep's method.

Same is valid for the optimizer object ("Optimizer"/"DSOptimizer").

 

Rule No.3: The unit object only exists once

Since a unique unit set is provided for CST MICROWAVE STUDIO and its associated canvas, there is a unique unit object that can be accessed through the extension "Units" as usual.

 

Rule No. 4: There are different result1D objects

Note that CST MICROWAVE STUDIO and CST DESIGN STUDIO both provide a result1D object. Such an object is created by the project object's method "Result1D". However, their implementations are quite different as CST DESIGN STUDIO stores its results in files orgainized inside a hierarchical folder structure (due to the diversity of the results for different tasks, different blocks, etc.) whereas the CST MICROWAVE STUDIO result files are located at the same level. So, take care that you always use the correct object, i.e.

Result1D("a1(1)1(1)") for a CST MICROWAVE STUDIO result and
DS.Result1D("Tasks\S-Parameters1\Blocks\TL1\S-Parameters\aS1,1") for a CST DESIGN STUDIO (canvas) result.