08-10-2011 06:35 PM
Hi there!
An interesting feature of LV 2011 is the possibility to separate (detach) the compiled code from a VI, which is mostly useful for source or version control purposes (if you modify a VI that is called by a bunch of others, only that VI will appear as "modified", whereas in the past, all calling VIs would be recompiled and appear "modified", although there actual diagrams and panels would remain identical).
One of the warnings in the help file, though, is that since the compiled code is cached in some other location than the VI, you are discouraged from using that if "you intend to load or run using the LabVIEW Run Time Engine".
I am not sure I am quite clear how this works for a project that I will eventually want to release as a standalone application. Does it say that I cannot detach the compiled code from any of the VIs in the project? Of any dynamically called VI in the project? Or it does not apply (if everything is recompiled for the standalone application)?
Thanks for clarifying.
Solved! Go to Solution.
08-10-2011 06:49 PM
I actually realized that this has been around since LV 2010 (but not as a option applying to all new VIs?). Anyway, my question remains, regardless of the LV version...
08-11-2011 01:10 AM
It does not apply if you use the application builder to build your executable, because all VIs going into the application will have their machine code.
It does apply if you create an application which dynamically calls VIs which you didn't originally put into the application, such as plugins (although even then you can create a build spec which will resave those VIs with the machine code).
08-11-2011 12:48 PM
What kind of build specification are we talking about? The choices I see do not include mere VIs or even llb, just packed library, shared libray, source distribution (maybe that one?), etc...
08-11-2011 02:06 PM
Yes, a source distribution. Alternatively, you could try using something like VIPM to build your collection of VIs.
Never having created an application which needs this, I can't offer any practical advice (assuming you even need it).
08-17-2011 03:43 PM
Is there actually a simple way to remove the compiled code from VIs which were previously created and saved with compiled code attached? Right now I am going through an endless list of VIs selecting Properties and checking the damn box for each one...
08-17-2011 03:55 PM
Too late to edit the previous message... The additional annoyance to having to Select Properties and check the box is that it is impossible if the VI has no changes (has been saved), since the box is grayed out in this case. So you have to actually modify the VI to be able to detach its compiled code.
08-18-2011 12:36 AM
I still use 2009, which doesn't have this feature, so I can't provide the exact details, but you can create a new project, add your code as an autopopulating folder and then right click *something* (the project, the target, the folder) and select an option which will open a new dialog which allows you to modify all the VIs in that something together.
There should also be VIs online which simply iterate over a hierarchy of folders and set this property on all the VIs.
08-18-2011 12:27 PM
Very useful trick, tst. The object to right click is the project itself. Then Properties shows the check box mentioned earlier.
I am wondering whether VIs in "Dependencies" are affected as well? I should probably try it...when I have time to experiment.
08-19-2011 02:38 AM
@X. wrote:
I am wondering whether VIs in "Dependencies" are affected as well?
I'm pretty sure they're not, which is why I suggested the new project with the auto-pop. folders. This makes sure you get all the VIs in the file hierarchy.