• 易迪拓培训,专注于微波、射频、天线设计工程师的培养
首页 > HFSS > HFSS help > Named Array Values with All Key Value Pairs

HFSS15: Named Array Values with All Key Value Pairs

录入:edatop.com     点击:

While it is in general not allowed to replace the arrays and nested arrays with python dictionaries, in the case where the named array consists entirely of key value pairs (like the sample above), one can use a dictionary and avoid typing the trailing := symbols after the keys. This further aids readability of the script.

• If all key value pairs

•  Remove the trailing “:=” after each key

•  Replace the “,” after the key with a “:”

•  If the named array is the top level argument, ensure that the “NAME:name” is present and is split into “NAME” : “name” as a key value pair

• Enclose the converted array in a { } pair to declare the dictionary.

oEditor.CreateCone(

{

"NAME" : "ConeParameters",

"XCenter" : "0mm",

"YCenter" : "0mm",

"ZCenter" : "0mm",

"WhichAxis" : "Z",

"Height" : "2mm",

"BottomRadius": "1.56204993518133mm",

"TopRadius" : "0mm"

},

{

"NAME" : "Attributes",

"Name" : "Cone1",

"Flags" : "",

"Color" : "(132 132 193)",

"Transparency" : 0,

"PartCoordinateSystem": "Global",

"UDMId" : "",

"MaterialValue" : ""vacuum"",

"SolveInside" : True

}

Sample Script 6: CreateCone in IronPython using dictionary syntax

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

上一篇:Moving Edges Along Normal
下一篇:Object Misalignment Tab

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

  网站地图