Get 0D results from CST to MATLAB

Hi all, I'm struggling on this export from CST to MATLAB using the direct call.
I managed to export the 1D results, for example Transient, Eye, .... Now I have to export the Eye Height but I don't know how to execute the instruction. It is clear that GetArray won't work because it's a 0D result, but at the same time I didn't find any other call to take those values.
Can someone solve this or maybe imagine how to solve it ???
design.invoke("ReportInformationToWindow","Reading Results")
ResultPath="Tasks\Tran_bitpattern\EyeAnalysis1\Eye size\Eye height (1D)";
ResultTree = design.invoke('DSResulttree'); %
filename = ResultTree.invoke('GetFileFromTreeItem', ResultPath); %it is a real .sig file on disk
data = design.invoke('Result0D',filename);
% time=data.invoke("GetArray",'x'); % time data
% hight=data.invoke("GetArray",'y'); % voltage data

Answers (1)

Hi Michele,
In CST–MATLAB automation, 0D results such as Eye Height are scalar values, so they cannot be accessed using "GetArray", which is intended only for 1D or higher-dimensional datasets containing X–Y arrays. After retrieving the .sig file using "GetFileFromTreeItem", the value should be read from the Result0D object using the "GetValue" method instead.
Here is an example depicting the same:
design.invoke("ReportInformationToWindow","Reading Results");
ResultPath = "Tasks\Tran_bitpattern\EyeAnalysis1\Eye size\Eye height (1D)";
ResultTree = design.invoke('DSResulttree');
filename = ResultTree.invoke('GetFileFromTreeItem', ResultPath);
data = design.invoke('Result0D', filename);
eyeHeight = data.invoke('GetValue'); % scalar 0D value
More details on calling COM methods from MATLAB can be found in the MATLAB documentation on "invoke": https://www.mathworks.com/help/matlab/ref/com.invoke.html
I hope it helps.

1 Comment

Hi Satyam,
I tried it but unfortunately i receive an error like this:
>> cstCALL
Error using Interface.CSTStudio_application_OpenDesign_Handle_Unknown/invoke
Invoke Error: Unknown name or named argument
Error in cstCALL (line 25)
eyeHeight = data.invoke('GetValue'); % scalar 0D value
^^^^^^^^^^^^^^^^^^^^^^^
I asked also internally and, apparently, CST GetData( double Value ) method requires the variable Value to be passed by reference (byRef) to which the results are written and passing variables by reference is not supported by MATLAB.
I think the only way to do it is passing through python, but if you have any other suggestion I'm here

Sign in to comment.

Categories

Find more on MATLAB in Help Center and File Exchange

Asked:

on 20 Feb 2026

Commented:

on 11 Mar 2026

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!