几何尺寸与公差论坛

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

【转帖】active doc

[复制链接]
发表于 2009-4-13 08:39:56 | 显示全部楼层 |阅读模式
active doc
i have used sw for about a month and am still a newbie here.
i downloaded some sample macros and am just wondering what the diff. between currentdoc and part???
set currentdoc = swapp.activedoc
set part = swapp.activedoc
chris
solidworks 2007 (office pro.) sp5.0
testing solidworks 2009 (pro) sp0.0
dell precision t3400
2 cpu (8500) 3.16 ghz, 3.25 gb of ram
window xp pro sp2
nvidia fx 570 6.14.11.6262
the statement you are using is assigning a variable to the active document. without the code before these lines where it states dim currentdoc as ???, and dim part as ???, there is no difference.
i thought part is a predefined var. or sw keyword??? because i only saw currentdoc declared as object
public currentdoc as object
chris
solidworks 2007 (office pro.) sp5.0
testing solidworks 2009 (pro) sp0.0
dell precision t3400
2 cpu (8500) 3.16 ghz, 3.25 gb of ram
window xp pro sp2
nvidia fx 570 6.14.11.6262
nope part should be defined too. if they are not defined they are objects, so in this case they are both identical
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-12-23 23:07 , Processed in 0.035840 second(s), 19 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

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