10-04-2007 09:54 AM
10-04-2007 09:59 AM
10-04-2007 10:10 AM
10-04-2007 12:48 PM
By default, LV recompiles each VI (or maybe only a part of it?) every single time you make a change. That's why the VI can immediately break. When you save a VI, the compiled code is saved as part of the VI.
Sometimes, things can break without LV noticing and they might even continue working (e.g. when using ActiveX or .NET objects). Ctrl+Run or Ctrl+Shift+Run force LV to compile the current VI or all the VIs in its hierarchy even though no change was made to them. It's not something which usually needed - note the Ctrl and Shift parts, which are not usually used. When you do this, LV will ask you if you want to save each and every VI in the hierarchy, because it recompiled them and the new recompiled code needs to be saved as part of the VI.
The only place where I have seen the need for this is when you build an application with .NET and COM objects - the application builder does recompile all the VIs (that's why it takes some time to build an application) and if you have VIs which broke but continued to work in the IDE, it will throw an error without giving you any good indication of the reason for the error. Force compiling all the VIs will then show you which VIs are broken so that you can go fix them.
10-05-2007 02:42 AM
10-05-2007 09:10 AM - edited 10-05-2007 09:10 AM
Message Edited by GerTheDwarf on 10-05-2007 09:13 AM
10-05-2007 05:35 PM
10-06-2007 04:07 AM
Just a side comment: Forcing a recompile is also a quick and dirty way to clear uninitialized shift registers. 🙂
@tst wrote:
The only place where I have seen the need for this is when you build an application with .NET and COM objects
10-06-2007 11:30 AM
@altenbach wrote:
Just a side comment: Forcing a recompile is also a quick and dirty way to clear uninitialized shift registers. 🙂
@tst wrote:
The only place where I have seen the need for this is when you build an application with .NET and COM objects
And I sometimes use it for an entire hierarchy followed by a save all VIs, to find out on disk what Vis in my project directroy tree are not used anymore and why as well as if that could be a problem.
Rolf Kalbermatter
10-06-2007 11:50 AM
@rolfk wrote:
And I sometimes use it for an entire hierarchy followed by a save all VIs, to find out on disk what Vis in my project directroy tree are not used anymore and why as well as if that could be a problem.
If I do that (which I don't always do), I prefer doing a programmatic check for callers in the hierarchy. I wouldn't want to save NI VIs or have to commit all the VIs to SCC for no reason.
I believe E. Blasberg posted a find unused VIs to LAVA once which can be used if people don't feel like writing their own.