LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

why does labview load vis from exe instead of vi.lib?

Solved!
Go to solution

The exe is an output, not a project item. You could set things up like I do:

 

Project dir

         NI project files (3 files saved by LV for every project)

         Build

              Exes go here

         Code dir

              Code goes here

 

 

Include code dir as an auto-populating folder in the project explorer. Bingo, no more conflicts because your output exes are outside the code path, as they should be. You can still use them to build installers.

0 Kudos
Message 11 of 20
(2,001 Views)

I think you misunderstand Toe (or i do). OP wants the installer to include an extra .exe and thus need to have it in the project else the installer cant include it.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 12 of 20
(1,996 Views)

One possible workaround is to rename the .exe to another file type (say .txt), then rename to .exe after installation.

It wouldn't be possible to define an item in the Windows menus, though.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 13 of 20
(1,993 Views)

Hi,

 

There seems to be some confusion, I apologize for the lack of clarity.The exe I am adding to the project is not the exe of the code in the project. The exe is the output of a different project with different code. I add it in the installer so that one installer will install the exe of the current project and the additional exe.

 

 Current folder structure is:

Project dir

         NI project files

         Project code in a number of folders

         Spectrum analyzer folder

                 Spectrumanalyzer.exe

 

When creating the installer, I use the output of the build of the current project + two additional exes: one is a TCP-Based communicator (a TCP object, if you will). This doesn't cause any problems though virtually all of its subvis are from VI lib. The second is spectrum analyzer.exe. Therefore our installer installs three exes: the project code exe + two additional exes. In order to setup the installer this way, I need both additional exes in the project. This second exe causes labview to be eternally conflicted over 4 image VIs (flatten pixmap and 3 similar ones) that are in vi.lib as well as in the exe. This conflict happens only when opening the VIs that have these subvis in them. It doesn't disturb the builds at all, and once resolved causes no further problems.

 

My question was:

a. Why does Labview search for VIs within exes at all? It can't use them (it shows "file not found" when trying)

b. Why does it ask again and again and not remember the previous response?

 

I hope that that is clearer.

 

Thanks,

Danielle

"Wisdom comes from experience. Experience is often a result of lack of wisdom.”
― Terry Pratchett
0 Kudos
Message 14 of 20
(1,990 Views)

Have a look in project explorer -> tools -> options -> paths -> VI search path

 

Uncheck "use default" and remove the path to your .exe file (if the path is there)

 

/Palle

 

project paths.PNG

Message 15 of 20
(1,987 Views)
Solution
Accepted by dsavir

It looks like you exe file is build in a strange way. I think that is what gives you problems.

It looks like the exe is releying on a local copy of vi.lib, and not the standard one.

 

Given that path that the exe has loaded the vi.lib:

SpectrumAnalyzer.exe\1abvi3w\vi.lib\picture\....

This is a local copy. Who ever has build this exe, has copied the vi.lib and referenced to this local copy and not the standard one. The local copy of vi.lib is then build into the exe.

LabVIEW is then confused by what version of the vi.lib you what to use, the local copy or the standard.

 

Fix the exe to reference only the standard vi.lib, and your problems should be gone.

Message 16 of 20
(1,983 Views)

@dsavir wrote:

Hi,

 

There seems to be some confusion, I apologize for the lack of clarity.The exe I am adding to the project is not the exe of the code in the project. The exe is the output of a different project with different code. I add it in the installer so that one installer will install the exe of the current project and the additional exe.

 

 Current folder structure is:

Project dir

         NI project files

         Project code in a number of folders

         Spectrum analyzer folder

                 Spectrumanalyzer.exe

 

When creating the installer, I use the output of the build of the current project + two additional exes: one is a TCP-Based communicator (a TCP object, if you will). This doesn't cause any problems though virtually all of its subvis are from VI lib. The second is spectrum analyzer.exe. Therefore our installer installs three exes: the project code exe + two additional exes. In order to setup the installer this way, I need both additional exes in the project. This second exe causes labview to be eternally conflicted over 4 image VIs (flatten pixmap and 3 similar ones) that are in vi.lib as well as in the exe. This conflict happens only when opening the VIs that have these subvis in them. It doesn't disturb the builds at all, and once resolved causes no further problems.

 

My question was:

a. Why does Labview search for VIs within exes at all? It can't use them (it shows "file not found" when trying)

b. Why does it ask again and again and not remember the previous response?

 

I hope that that is clearer.

 

Thanks,

Danielle


When starting your project up, LabVIEW loads the exe into memory as it will do with all other vi's.
And as long as the calling for Unflatten Pixmaps.vi is not aligned in both the exe and your other vi's it will complain that there are 2 vi's with same name trying to be loaded into memory.

0 Kudos
Message 17 of 20
(1,976 Views)

Yes this may possible.Because of two same VI it is posing problem.

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 18 of 20
(1,966 Views)

dkfire, you are right, there was a local copy of an lvlib from vi.lib (made by mistake). I'll try to remove it. Thank you very much!

 

Danielle

"Wisdom comes from experience. Experience is often a result of lack of wisdom.”
― Terry Pratchett
Message 19 of 20
(1,960 Views)

Yet some information keep at the back of your head, i'm sure i'll need it some day. 🙂

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 20 of 20
(1,952 Views)