Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Problems with macros in CST MWs 2009

Status
Not open for further replies.

arkaos

Newbie level 2
Joined
Jan 13, 2010
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,298
Hi,

I would like get S11 of this project (test.cst):
-------------
Sub Results
Dim a11 As Object
Dim p11 As Object
Set a11 = Result1D ("a1(1)1(1).sig")
Set p11 = Result1D ("p1(1)1(1)")

Dim n As Integer
Dim frq As Double
Dim phase As Double
Dim ampli As Double
Dim real As Double

frq=12
n=a11.GetClosestIndexFromX(frq)
phase = Pi/180.0 * p11.GetY(n)
ampli = a11.GetY(n)
real = ampli * Cos(phase)

End Sub

Sub Main
'Starts CST MICROWAVE STUDIO®
Set studio = CreateObject("CSTStudio.Application")
Set proj = studio_OpenFile("C:\MyDoc\test.cst")

Results
End Sub
---------

However, I have this warning:

----
Unable to read result file: C:\MyDoc\Temp\DE24\Untitled_0\Result\a1(1)1(1).sig
(Set a11=Result1D("a1(1)1(1)"))
----

How can I read the S11?

Thanks,
 

Hi,

I found an interface for accesing result,CSTResultReader.dll is in Advance topic in the help. There are some example.

When I try use this example "Using CSTResultReding.dll from within a Visual Basic script" in my program. I get this fail:

(10040) Moduled could not be loaded
(iErr=OpenProject sProjName, projHandle)

Somebody could help me?

THX
 

--------
However, I have this warning:
----
Unable to read result file: C:\MyDoc\Temp\DE24\Untitled_0\Result\a1(1)1(1).sig
(Set a11=Result1D("a1(1)1(1)"))
----

How can I read the S11?

I use code for S11 access:
With Result1D ("a1(1)1(1) ") ' Connect to S11
nn = .GetN ' Get number of frq-points
For ii = 0 To nn-1
' Read all points, index of first point is zero.
F = .GetX(ii) ' here: frequency
S11 = .GetY(ii) ' here: according S11
Next ii
End With
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top