LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to release VI references from memory that were opened by the Application Builder?

Hello, I was wondering if it is possible to programmatically close all references to VIs that are open in memory such that they are no longer stored by LabVIEW in memory. I am using the LabVIEW Application Builder to build my software into an executable. I have a "build server" which runs constantly and listens for instructions to start a new build of my software via TCP. When it receives instructions to start a build, it executes Subversion (SVN) commands to update the working copy of my software to the latest version, then opens the project and builds it. The problem is that many of the VIs that are part of the project remain in memory after the application builder has run. As a result, if I try to start a new build without restarting the build server VI, it will change the VI files on the disk when it updates from SVN then try to load them again, resulting in conflicts with the copies of the VIs that are still in memory. This gives an error dialog for each VI. As such, I would like to be able to close all of the VIs that are open in memory programmatically, however I can't seem to find a method of doing so. I have included an image of my attempt, however the VIs remain in memory. I was wondering if anyone knows how to achieve this?

 

VIsInMemory.png

0 Kudos
Message 1 of 6
(3,280 Views)

What if you use the Abort VI invoke node before you close the reference?

 

The way you wired it only closes the refnum you just created, it doesn't mean "Close VI".

0 Kudos
Message 2 of 6
(3,261 Views)

@1abvi3w wrote:

What if you use the Abort VI invoke node before you close the reference?

 

The way you wired it only closes the refnum you just created, it doesn't mean "Close VI".


Abort VI is not going to help.

 

The OP might need to quit and restart LabVIEW.  This CAN be done programatically.  You should speak with you local NI Rep for t


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 6
(3,250 Views)

@1abvi3w wrote:

What if you use the Abort VI invoke node before you close the reference?

 

The way you wired it only closes the refnum you just created, it doesn't mean "Close VI".


Abort VI is not going to help.

 

The OP might need to quit and restart LabVIEW.  This CAN be done programatically.  You should speak with you local NI Rep for the exact means of doing that----It may not be a "Public" Method.

 

Then again, I have not installed 2015


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 6
(3,246 Views)

Jeff·Þ·Bohrer wrote:

The OP might need to quit and restart LabVIEW.  This CAN be done programatically.  You should speak with you local NI Rep for the exact means of doing that----It may not be a "Public" Method.

 

Then again, I have not installed 2015


Was the restart not public in 2014?  I have private methods enabled in 2015 but the color of the method looks public.

 

In any case I've restarted LabVIEW in the past with a batch file that kills, then re-launches LabVIEW so that is also another method.  But the much more clean method is to use this invoke node.

 

Example_VI_BD.png

0 Kudos
Message 5 of 6
(3,162 Views)

Is you building VI in the same project as application to build? I separated the building project and application project I needed to build. When you close target project after build it should get rid of everything associated with it. 

0 Kudos
Message 6 of 6
(3,146 Views)