02-22-2022 05:02 PM - edited 02-22-2022 05:14 PM
The code is calling Close Config Data.vi. The error is apparently caused by the deep internal call chain. Why would Close Config Data.vi complain about an invalid path since it's input is a refnum? I just saw this in LV 2015. The preceding Open and Write succeeded.
Solved! Go to Solution.
02-23-2022 08:36 AM
> Why would Close Config Data.vi complain about an invalid path since it's input is a refnum?
It was not. Possible reason(s) says IF "...the input is a path, the path might contain a character not allowed...". In this case, the input is a refnum so the error would be indicating an invalid refnum. My refnum was created by Open and used by Write successfully so valid just before. Unlike the original poster's screenshot, I have no other error displayed. While debugging I noticed the cause, two Close calls in a row, one hidden under other structures, thus the 2nd call complaining that the refnum was already closed.
02-23-2022 08:46 AM - edited 02-23-2022 08:53 AM
I have split this off the 5 yearold post you accidentally replied to.
Perhaps you could give us a bit more information about your problem? Can you show a snippet of the code causing the error?
09-29-2026 04:07 PM
If you're getting Error 1 when calling Close Config Data.vi, check to make sure the refnum is propagated.
In loops, check to make sure that the refnum is using a shift register.
I ran into this error when the loop was set to output the last value instead of using a shift register.