Hi,

I'm trying to run a VBA macro to obtain s11 phase results from my cst simulation following the instructions here: https://space.mit.edu/RADIO/CST_online/vba/vba_macro_language_overview.htm#:~:text=%2C%20replace%2C%20etc.-,VBA%20Help%20System,the%20basic%20VBA%20language%20elements.

But I keep receiving the following error in cst:

Error in macro execution, please check:

Expecting ')'

(With Result1D( patch sweep 1^"p1(1)1(1)")

But I'm pretty sure I've put all the relevant ')' in the right place

Here's the VBA code:

Sub Main ()

Dim n As Long, i As Long

Dim vx As Double, vy As Double

With Result1D(patch sweep 1^"p1(1)1(1)")

n = .GetN

For i = 0 To n-1

' Read all points with zero based

' indices

vx = .GetX(i) ' Get frequency of data point

vy = .GetY(i) ' Get phase of data point

Next i

End With

End Sub

Any help appreciated.

More Daniel Trussler's questions See All
Similar questions and discussions