几何尺寸与公差论坛

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

【转帖】custom properties calls

[复制链接]
发表于 2009-4-12 17:56:48 | 显示全部楼层 |阅读模式
custom properties calls
hi all,
i need a bit of help here. i am modifying some of my macros in sw 2008, and am trying to manipulate some custom properties. i need to get the current value of an existing one. the property is under the 'custom' tab, (part wide), not under the individual configuration tab. i can change teh value no problem, but how do i retrieve the current value. i am using, or trying to use the new, wonderful custom property manager, but how do i retrieve the properties that are not configuration specific?
thanks
tom
just retrieve the custompropertymanager object from the modeldocextension object rather than from a configuration object.
i'll get you eh steve, if it's the last thing i dooooo!
josh,
thanks, but can i bug you a bit more. here part of my code....
set model = swapp.activedoc ' attach to the active document
doc_propmgr = model.custompropertymanager("")
of course, when i go tot run it i get "object does not support this property or method"
a couple things...
set model = swapp.activedoc ' attach to the active document
this line sets the variable "model" to point to the modeldoc2 object. the custom property manager has to be retrieved from the modeldocextension object, which is gotten from [modeldoc2 object].extension.
the custom property manager is an object, so to get it you have to use the set keyword (i think it's a keyword?).
put those two things together and you get:
set doc_propmgr = model.extension.custompropertymanager("")
i'll get you eh steve, if it's the last thing i dooooo!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-12-22 23:43 , Processed in 0.034588 second(s), 19 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

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