要导出如图所示这个面上的电磁场,可以生成这个面上的一系列点,计算出这些点的场值,然后保存到文件。
' ----------------------------------------------
' Script Recorded by Ansoft HFSS Version 15.0.0
' 2:01:46 下午 11月 15, 2017
' ----------------------------------------------
Dim oAnsoftApp
Dim oDesktop
Dim oProject
Dim oDesign
Dim oEditor
Dim oModule
Set oAnsoftApp = CreateObject("AnsoftHfss.HfssScriptInterface")
Set oDesktop = oAnsoftApp.GetAppDesktop()
oDesktop.RestoreWindow
Set oProject = oDesktop.SetActiveProject("cavity-waveguide-for-MAGY")
'The field on the coupled plane is correct by checking.
'=================================================================
dim Bs
'=======================@output file=====================================
Set oFS = CreateObject("Scripting.FileSystemObject")
path_Bs_E="Bs_E.txt"
Set ofile_Bs_E = oFS.CreateTextFile (path_Bs_E)
' ==========腔体的结构数据==========================================