LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Pre/Post Build in application builder.

While reading the document on Optimizing Execution Speed for Built Applications, I got to know there is 'Pre/Post Build Actions'.

When is it useful in setting for Pre(Post) VI which the option requires to put?

 

labmaster.

0 Kudos
Message 1 of 23
(2,640 Views)

Hi labmaster,

 

once I used the PostBuildVI action to remind me on some parameters I had to set for creating some setup routines later on.

 

You can use both actions to do things you usually want to do with your VIs before/after creating the executable. The PreBuild action is a little bit limited because the AppBuilder internally caches all VI before calling the PreBuild VI, so you cannot change them in this step anymore…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 23
(2,627 Views)

Thank you, Knight!

 

Can you describe some typical works before/after creating the executable?

In my working range, I cannot imagine this.

 

labmaster.

0 Kudos
Message 3 of 23
(2,621 Views)

Hi labmaster,

 


@labmaster wrote:

Can you describe some typical works before/after creating the executable?


For certain reasons I used a different "setup creator" tool instead of the NI AppBuilder to create a setup package for other computers. The PostBuild action is a simple way to start this other tool…

 

The PreBuild action can be used to set version numbers or to collect/prepare some additional data used for creating the executable. (Beware of its limitations as written above.)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 23
(2,618 Views)

I use PreBuild.vi to set the symbols  for conditional disable structure.

 

https://forums.ni.com/t5/LabVIEW/Is-there-a-work-around-for-not-having-access-to-conditional/m-p/366...

Message 5 of 23
(2,604 Views)

@wladimiripg wrote:

I use PreBuild.vi to set the symbols  for conditional disable structure.

 

https://forums.ni.com/t5/LabVIEW/Is-there-a-work-around-for-not-having-access-to-conditional/m-p/366...


Me too. 2 symbols, to build 4 applications with the same code base.

 

I also have pre build VIs that add all classes in my project to a VI diagram that is always included in the build. Some classes are loaded dynamically, and not automatically included in the executable.

0 Kudos
Message 6 of 23
(2,592 Views)

I hade a project that ran on a VM and it was extremely laggy, so it was easy to move things around that shouldn't be moved. So i locked most of the front panel down while developing and used a pre-build to release stuff at compile time.

In another one i used the tokens for conditional builds, as others have, to include or exclude a component that needed an external license, so the customer could run 2 versions, with and without it and same some licenses (otherwise all stations needed a license all the time, but it was only used in 10% of the cases). 🙂

 

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

Qestit Systems
Certified-LabVIEW-Developer
Message 7 of 23
(2,577 Views)

Just remembered - I also have a post build action.

 

After building my executable, I zip all build content. The customer uses exe zips and installer zips. Sadly, the installer zips can't be created with a post build...

0 Kudos
Message 8 of 23
(2,569 Views)

I happen to use the post build to create a checksum associated with my executable.  It saves me a few minutes of time with my builds.

Message 9 of 23
(2,567 Views)

Ah, another afterthought.

 

My prebuild action switches symbols. But before it does that, I create a warning.

 

Changing the symbols, changes the source code. That's annoying, because a save all messes up my SCC. Not saving all could mean I loose relevant changes. Changing back the symbols will still mark the VIs as changed.

 

So I popup a warning stating the symbols will be changed (if they indeed change). If I cancel, I can save all relevant changes, and start the build again and then close without saving.

0 Kudos
Message 10 of 23
(2,566 Views)