• 易迪拓培训,专注于微波、射频、天线设计工程师的培养
首页 > HFSS > HFSS help > VBscript Method Call Types

HFSS15: VBscript Method Call Types

录入:edatop.com     点击:

VBScript method calls fall into two categories and the distinction between the two results in syntax differences. These syntax differences are significant when converting VBScript to IronPython.

VBScript Functions

In VBScript terminology functions return values. The syntax for this is the one shared with practically all programming languages.

Set oDesktop = oAnsoftApp.GetAppDesktop()

Set oProject = oDesktop.NewProject

Sample Script 2: VBScript function call sample

Note that the significant item here is that the method name is always followed by an argument list enclosed in parentheses if there are arguments. If the argument list is empty as shown above for the NewProject call, the parentheses can be omitted.

VBScript Sub-Routines

VBScript Sub-Routines are those that do not have any return value. VBScript allows these to be written without any parentheses even if they have a non-empty argument list.

oModule.CreateReport "XY Plot1", "Standard", "XY Plot", "optimtee : optimtee", _

Array("Domain:=", "Sweep"), Array("Freq:=", Array("All"), "offset:=",_

Array("0uin")), Array("X Component:=", "Freq", "Y Component:=", _

Array("dB20(S(1,1))", "dB20(S(1,2))", "dB20(S(1,3))", _

"dB20(S(2,1))", "dB20(S(2,2))", "dB20(S(2,3))", "dB20(S(3,1))",

"dB20(S(3,2))", "dB20(S(3,3))")), Array()

Sample Script 3: VBScript Sub-Routine sample

HFSS 学习培训课程套装,专家讲解,视频教学,帮助您全面系统地学习掌握HFSS

上一篇:Viewing Cost Results for an Optimization Analysis
下一篇:Viewing Distributed Analysis Subtasks

HFSS视频培训课程推荐详情>>
HFSS教程推荐

  网站地图