Hi,
Getting this error below:
Error:0 'Invalid procedure call or argument: 'objFit.Simple''
VBScript Code:
VB.NET Library Code:
I can call the function fine if I change its input parameter to say just a single and call it passing in just a single.
I've read that it could be that when VB Script is passing in the array, it is actually a variant and so doesn't match what the function is expecting, hence the error.
Here's a link to someone else who had the problem, but no solution:
http://www.visualbasicscript.com/m34060-print.aspx
All this is on Windows 7. VBScript is running via OPUS software made by Bruker. VB.NET library created in VS2010
Thanks
Getting this error below:
Error:0 'Invalid procedure call or argument: 'objFit.Simple''
VBScript Code:
Code:
dim objFit , alInputTemperatures
set objFit = CreateObject("VB_EPICS.CurveFunctions")
alInputTemperatures = Array(10,20,30,50)
msgbox(objFit.Simple(alInputTemperatures))VB.NET Library Code:
Code:
Public Class CurveFunctions
Public Function Simple(ByRef inp() As Single) As String
Return "Hello There"
End FunctionI can call the function fine if I change its input parameter to say just a single and call it passing in just a single.
I've read that it could be that when VB Script is passing in the array, it is actually a variant and so doesn't match what the function is expecting, hence the error.
Here's a link to someone else who had the problem, but no solution:
http://www.visualbasicscript.com/m34060-print.aspx
All this is on Windows 7. VBScript is running via OPUS software made by Bruker. VB.NET library created in VS2010
Thanks