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.

Using VBA code to sweep the input resistance of antenna

Status
Not open for further replies.

Faddei

Junior Member level 2
Joined
Dec 20, 2007
Messages
23
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,458
CST MWS VBA

Hi all.
I m trying to sweep the input resistance of an antenna. I m using for that VBA code below. It is working well but at the begin of each simulation the simulator asks me whether i want to delete the old results or save them. So i was thinking of deleting all the results at the end of each simulation. Can anyone please help me with that?
Thank you in advance.
Yousif


Sub Main

For i=1 To 10

'@ delete lumped element: element1
LumpedElement.Delete "element1"

'@ define lumped element: element1
With LumpedElement
.Reset
.SetName "element1"
.SetType "RLCSerial"
.SetR "1"
.SetL "0"
.SetC "0"
.SetGs "0"
.SetI0 "1e-14"
.SetT "300"
.SetP1 "False", ".25", "0", "0"
.SetP2 "False", "-.25", "0", "0"
.SetInvert "False"
.SetMonitor "True"
.Create
End With


'define the simulation
With Solver
.CalculationType "TD-PLW"
.StimulationPort "Plane wave"
.StimulationMode "1"
.SteadyStateLimit "-30"
.MeshAdaption "False"
.StoreTDResultsInCache "False"
.FullDeembedding "False"
.UseNetworkComputing "False"
End With

'start the simulation
With Solver
.Start
End With

'store the results
SelectTreeItem("1D Results\Lumped Elements\Voltages\Signals\element1 [pw]")
ExportPlotData "vt" & i &".sig"

SelectTreeItem("1D Results\Lumped Elements\Voltages\|U| linear\element1 [pw]")
ExportPlotData "vf" & i &".sig"

SelectTreeItem("1D Results\Lumped Elements\Currents\Signals\element1 [pw]")
ExportPlotData "it" & i &".sig"

SelectTreeItem("1D Results\Lumped Elements\Currents\|I| linear\element1 [pw]")
ExportPlotData "if" & i &".sig"


'remove the results
Next i
End Sub
 

Re: CST MWS VBA

I have already solved the problem using autoit. But still would like to get any comment about my question.
 

CST MWS VBA

vba is very useful for modeling in HFSS and CST.but there is few talk on this topic.
 
  • Like
Reactions: Faddei

    Faddei

    Points: 2
    Helpful Answer Positive Rating
Re: CST MWS VBA

ansonjimli said:
vba is very useful for modeling in HFSS and CST.but there is few talk on this topic.
Thanks for your reply. You are right there are few people who are working on this. But i am happy i could solve the problem by my self.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top