LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to enter a constant to the application builder?

Hello,

I have an application that I want to compile into two versions, a demo version and a operational version. In the Vi there's a Boolean called DemoVersion that, depending on its value, determines the behavior of the application. Is there a way to enter a constant in the building process to set the Boolean?

Thanks,

Marce
0 Kudos
Message 1 of 11
(4,640 Views)
One way of doing this is to have two build files.

One for the 'full' version and one for the 'demo' version.

You might want to do what most people do and have the user enter a 'pass key' which enables options in the software.

Also there is a demonstration VI which shows how to load VI's programatically. Thus you can replace a VI or bundle additional VI's as you wish.

I have not seen any feature for controlling the building of VI's based on a constant or parameter (like a MAKE file in C compilers with parameters).
0 Kudos
Message 2 of 11
(4,616 Views)
Thanks for the answer. I was out for a while and saw it just today.

I have separated the engine from the UI in two main Vis but I still have to keep several UI Vis, one for each set of options. I hope NI people add some more functionality to the App. Builder soon.

Thanks,

Marce
0 Kudos
Message 3 of 11
(4,582 Views)
I'm not sure if it can help you, but have you tried looking at the openg builder?

___________________
Try to take over the world!
0 Kudos
Message 4 of 11
(4,566 Views)
"I hope NI people add some more functionality to the App. Builder soon."

Ask and you shall receive. Get into the LV Beta testing to find out more.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 5 of 11
(4,545 Views)
Waiting for the new version to appear, you may do another way.
If you isolate the boolean (as a variable) into a private global VI, you can switch between versions by replacing a single file.
You could also automate this task by writing a builder VI containing "_Build Application from Script.vi"


Paolo
Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 6 of 11
(4,535 Views)
Thanks for the answers.

Following is the way I work now.

1) The "variable constants" get their values in the first frame of the main sequence of the UI Vi.

2) I have a different UI Vi for each set of options

3) I have separated the Engine and the UI so I can continue with the development and debug of the Engine without having to copy the same changes for each set of options. So, all the UI Vis, communicate with the only Engine Vi using Invoke Nodes.

4) For each UI Vi, I have a BLD file that prepares the Installer for that specific set of options.

If the Appl. Builder had optional parameters/constants like in a Make file, I would keep just one main Vi and compile with different parameters according to the need. I Would still have one BLD file for each set of parameters but the housekeeping would be much easier since , each time, I'd just have to pick the right BLD and it'd prepare the respective Installer.

Pincpanter, I don't understand the meaning of "_Build Application from Script.vi", so I'd appreciate if you can give me details.

thanks,

Marce
0 Kudos
Message 7 of 11
(4,489 Views)
Hi Marce,
"_Build Application from Script.vi" is a VI that enables you to run a BLD file in an unattended way, a sort of "batch-like" building.
You can find it into (LabView folder)\project\prodisttool.llb (my LV is 7.0).
I've written a VI that use it to build five flavors of my application in a single shot. Actually I need to have five different BLDs, because differences are basically in the support files, but more sophisticated tasks could be accomplished before building an application.
Hoping this will be useful for you.

Paolo
Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 8 of 11
(4,462 Views)
Sorry for the delay in answering.

I've tried to see how the _Build_Application-From-Script.vi looks inside but I need a password. I don't really understand how it works. Can you please send me an example?

Thanks,

Marce
0 Kudos
Message 9 of 11
(4,386 Views)
Marce,

The Build Application from Script.vi is simply the VI that is called when you click the "Save" button in the regular Application Builder. So you configure the settings you want for the scripted build (one that you will use multiple times, presumably) and save it and then you can call that scripted build from the Application Builder in the future. If you take a look in the LabVIEW help at the section called "Saving a Build Script", it will explain how this is done. Then take a look at the section called "Building an Application or Shared Library from and Existing Script" to see how to use that scripted build.

I hope this helps. Have a good one!

Tyler S
0 Kudos
Message 10 of 11
(4,359 Views)