An AVI file can created or opened via "IMAQ AVI Create" or "IMAQ AVI Open," respectively. Each of these subVIs produce an AVI File Reference. Is there any way to check if that reference is valid? The "Not a NaN/Path/Ref?" primitive always returns true for this datatype, regardless of whether the AVI file reference refers to a valid open file or not. I have also tried other methods, all unsuccessful:
1) I saw that the AVI file reference is really just a strictly typed datalog file reference (with datatype int32), but trying to typecaste it to a datalog reference and checking that reference for validity did not work.
2) You can typecaste the AVI file ref to an int32 that produces the same number as the probe of the reference, but this number stays the same whether the AVI reference is open or closed, so it does not help
3) I tried to use the "IMAQ AVI Get Info" subVI so that I can trap an error and determine if the reference was valid, but this only works for read sessions of the AVI file reference (i.e., created with "IMAQ AVI Open"). A reference created by "IMAQ AVI Create" is a write session, and cannot be checked this way.
It seems like this should have already been implemented, but I guess LabVIEW treats the AVI file refernce quite uniquely. Many of the primitives that work on references do not work on this datatype. Is there any way to reproduce the functionality of "Not a NaN/Path/Ref?" for an AVI file reference?