几何尺寸与公差论坛

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

【转帖】passing something to a function and returning 2 strings

[复制链接]
发表于 2009-4-13 13:18:22 | 显示全部楼层 |阅读模式
passing something to a function and returning 2 strings
hi,
what i am trying to do is the sub main () has a handle of the active part so i want it to pass the it to a function test() and the function is going to get some measurements from the part and make one of the measurements = to "length" and the other = to "width" then i want to be able to use what length and width equal back in the sub main.
could somebody give me an example or an idea of how this is done ?
thanks
solidworks 2006,2007,2008,2009 (office premium.)
core 2 duo e6850 @ 3.00 mhz
window xp pro sp3 32 bit
ati firegl v7350
edited: 11/06/2008 at 10:53 am by ben guenther
answer if you declare your variables above your sub main procedure, then you will be able to access them from any of the procedures in the module. you then make another process to perform the task you want to accomplish.
dim length as string
dim width as string
sub main ()
[code]
process(part)
end sub
sub process (part as partdoc)
[code]
end sub
edited: 11/06/2008 at 11:41 am by blake dahle
thanks blake, so simple don't know why i could not get it.
solidworks 2006,2007,2008,2009 (office premium.)
core 2 duo e6850 @ 3.00 mhz
window xp pro sp3 32 bit
ati firegl v7350
quick
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

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

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

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