|
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 |
|