查看单个帖子
旧 2009-04-13, 01:43 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】propertyeditorglobal

propertyeditorglobal
i'm hoping someone here can help with me with an issue i'm having with this macro.
i have a large number of part files (~200) that i wish to add the property named "weight" to. the value for this will be the mass calculated by solidworks.
the problem i'm having is that in defining the properties to add via the macro i don't know what to enter for the value of this weight property. for instance, if i have a part open called part1, when i choose the mass in the drop-down list it is "sw-mass@@
i think this may help you. all the quotes are neccessary.
weight = """sw-mass@" & partno & ".sldprt"""
prop = swmodel.addcustominfo3(configuration_name, "weight", swcustominfotext, weight)

i forgot to mention that you must change partno and configuration_name to suit your needs.
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)