02-28-2018 09:32 PM
I wanted to run a VI script from MATLAB, and I looked up the Internet how to do so. I learned that if I used the following commands, I could run a VI.
e=actxserver('LabVIEW.Application'); vipath='c:\Documents\Labview files\test.vi'; vi=invoke(e,'GetVIReference',vipath); vi.Run
But this gives me an error.
Error using COM.LabVIEW_Application/GetVIReference Invoke Error, Dispatch Exception: Source: LabVIEW Description: LabVIEW: Open VI Reference no longer matches VIs in memory by filename. A filename is no longer sufficient because the full name of a VI now includes any owning libraries. Error in readColorVI (line 7) vi=invoke(e,'GetVIReference',vipath);
Does anyone have an idea what should I include apart from the file path to get the script running?
Thanks
Solved! Go to Solution.
03-01-2018 04:17 PM
Does the script run correctly in the LabVIEW environment?
03-01-2018 05:57 PM
Yes, it works perfectly.
03-02-2018 03:19 AM
Is that particular test.vi using any calls to sub-vis ?
03-02-2018 11:34 AM
If it works in LabVIEW, I would follow The Math Work's instructions and create a ticket with them if that does not work correctly.
03-02-2018 11:36 AM
The VI does call a sub VI, and that very well could be the problem. If there's a solution to it, I'd be glad to hear it.
If there isn't, then I'll raise a ticket at Math Works.
03-02-2018 07:14 PM
The easiest way to find out is to eliminate the subVI call and see if it still errors. If so, it's not the subVI
12-31-2018 06:19 AM
But what is the Win OS system command for running a VI?