几何尺寸与公差论坛

 找回密码
 注册
查看: 668|回复: 0

【转帖】propertyeditorglobal

[复制链接]
发表于 2009-4-13 13:43:32 | 显示全部楼层 |阅读模式
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.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|小黑屋|几何尺寸与公差论坛

GMT+8, 2024-12-23 04:00 , Processed in 0.035068 second(s), 20 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表