Passing variables between functions
Hello
I've written an automation for analysing FRAP data which requires array variables to be passed ByRef between functions. The automation works then the next time its run I get an Array Index out of range error. If I run it again it works fine and the next time the array error reappears. When I run in debug mode it seems to holding on to the values in the arrays after the automation has finished running. Is there a way of making VB or Premier forget the array variables after running.
Any help appreciated
Regards
David
0
Best Answer
-
David,I found a possible problem in your macro:You assign NumSlices after allocating of arrays :ReDim TheMaxValue(NumSlices) As SingleReDim TheMeanValue(NumSlices) As Single...NumSlices = DuplicateImage.FrameCountIt should be other way around.Yuri0
Answers
Hello
There might be a bit more to this than I thought as its now crashed a couple of times and when Premier re-starts it reopens all the files that I used previously even though they were closed when it crashed. I think Premier might be hanging on to more than just the array variables. I'm using Premier 3D 64-bit Version 9.1.2 Build 5429
Regards
David
Hello Yuri
I've attached the ipx file for my project and an example image is on my usual server. Its called 140824NET23NE_1-FRAP.seq
I can resend you the server location off list if you don't still have it.
Regards
David
Hello Yuri
Yours works, mine doesn't. I changed the ReDim statement from
Hello Yuri,
Allocating NumSlices first was the problem. No idea why it failed every other run rather than straight away but it works now.
Thanks
David