#2
loyxqing2023-02-14 20:53
|
最近在转VB代码到,有个功能函数涉及到ARRAY的套用,发现怎么都运行不下去,提示属性缺少,求助下坛友
软件功能函数描述:
ChangeProperty <propertyArgs>
Structured array. The properties vary depending on the object.
Due to the number of potential configurations, it is recommended that you generate this script using the UI's Automation tab.
我想将下面VB代码直接转到vbnet,原Array需要去掉,不知道应该怎么转。
VB代码示例
oDesign.ChangeProperty Array("NAME:AllTabs", _
Array("NAME:LocalVariableTab", _
Array("NAME:PropServers", "LocalVariables"), _
Array("NAME:NewProps", Array("NAME:BOT", "PropType:=", "VariableProp", "UserDef:=", true, "Value:=", "235mm"))
)
)
PYTHON代码示例
oDesign.ChangeProperty(
[
"NAME:AllTabs",
[
"NAME:LocalVariableTab",
[
"NAME:PropServers",
"LocalVariables"
],
[
"NAME:NewProps",
[
"NAME:K1",
"PropType:=" , "VariableProp",
"UserDef:=" , True,
"Value:=" , "235mm"
]
]
]
])