10-06-2005 09:55 AM
10-06-2005 12:47 PM
Hi,
The reason that you get the error message is that VBScript requires a "Call" when you call a function or subroutine which has more than one parameter. Calling a function also works if you assign the return parameter like you did in the first line of code. This is the syntax of VBScript as defined by Microsoft.
Here is what I would recommend : If you use a function and you assign the reurn value to a variable (like a = function() it works. If you call a subroutine like "sub()" alsways use "call sub()". This works, independant of the number of parameters.
Back to your specific question : To set a channel name, please use "Call ChnPropSet(1/ chnloop, "name")"
Let me know if you have further questions.
Andreas
10-07-2005 03:26 AM
Thanks for the help.
I am still having a problem with the line
axisnames = ChnPropGet(1/ chnloop, "name")
This just returns an empty string but if I use
axisnames = ChnPropGet(1/ 1, "name")
then it works fine. Any ideas why this is the case?
10-07-2005 05:56 AM
Please disregard the above post Ive discovered my error. I was trying to reference including the group rather than just with the channel number.
Thanks again.