淘宝官方店 推荐课程 在线工具 联系方式 关于我们 | |
微波射频仿真设计 Ansoft Designer 中文培训教程 | HFSS视频培训教程套装 |
|
首页 >> Ansoft Designer >> Ansoft Designer在线帮助文档 |
Script Guide > Named Array Values with All Key Value PairsWhile 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 syntaxRelated Topics Converting VBScript Function calls to IronPython Syntax
HFSS视频教程 ADS视频教程 CST视频教程 Ansoft Designer 中文教程 |
Copyright © 2006 - 2013 微波EDA网, All Rights Reserved 业务联系:mweda@163.com |