要輸出HFSS結果,必須先知道想要的數值屬於哪一種類別,比方說:
- Fields
- Modal Solution Type
- Antenna Parameters
- Emission Test
- Far Fields
- ...
不同類別各自包含不同的solution。而每一個soulution有對應的頻率範圍及變數範圍。底下的函式GetSolutionInfo()可以一次輸出現有專案內關於模擬結果的所有相關訊息:
def GetSolutionInfo():
'''Get all solution variables'''
oProject = oDesktop.GetActiveProject()
oDesign = oProject.GetActiveDesign()
oModule_rs = oDesign.GetModule("ReportSetup")
oModule_sol = oDesign.GetModule("Solutions")
result = {}
for report_type in oModule_rs.GetAvailableReportTypes():
result[report_type] = []
for solution in oModule_rs.GetAvailableSolutions(report_type):
result[report_type].append((solution,
oModule_sol.GetSolveRangeInfo(solution),
oModule_sol.GetAvailableVariations(solution),
))
# AddWarningMessage(str(result))
return result
if __name__ == '__main__':
info = GetSolutionInfo()
for i in info:
AddWarningMessage(i)
AddInfoMessage(str(info[i]))
(圖一)不同類別及其包括的solution |
沒有留言:
張貼留言