cancelar
Mostrando los resultados de 
Buscar en lugar de 
Quiere decir: 

findout path of vi already in memory from .NET app

 

From a .Net application, how do I findout the path of a VI already loaded and running ?

 

I tried this code, which resulted in an exception:

 

lv = new LabVIEW.ApplicationClass();

string vipath = "MYVI.vi"

vi = lv.GetVIReference(vipath,"", false, 0);

 

Exception:

System.Runtime.InteropServices.COMException (0x00001B21): 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.

 

Looks like GetVIReference(...) needs the absolute path.  But in my case, I am trying to findout what the path is.   Is there another method I can try ?

 

Thanks,  ert.

0 kudos
Mensaje 1 de 2
2.400 Vistas

Hi eetrr, 

 

I think this VI might give a good idea for what you want to do. Try implementing this VI changing open VI reference to open application reference. 

 

https://decibel.ni.com/content/docs/DOC-7658

 

This will provide the file path of the VI. You will then need to use this second example as guide to help you interface between the path finding VI and your .NET application.

 

https://decibel.ni.com/content/docs/DOC-25663

 

 

Ryan
Applications Engineer
National Instruments
0 kudos
Mensaje 2 de 2
2.375 Vistas