10-17-2019 02:31 AM
Hi
Fom Labview 2016, i'm using symbols and disabled conditions structures in order to have different contexts of execution. (like "RUN_TIME_ENGINE" but personalized) Then, I'm validating the corresponding deployed executable.
problem: when I'm creating my executables, there doesn't seem to be equivalent settings in the executable properties, for personalizing the executable.
consequently I have to manually set the variables for each one, and it's a pain in the ass.
do you have an idea to improve the deployment of .exe depending of variables?
Solved! Go to Solution.
10-19-2019 12:21 PM
What exactly is your use case?
If you're building an executable, it's already bound to the OS and bitness you're using to create it. (Windows LabVIEW will make Windows executables. macOS LabVIEW will make macOS dmg files. 32-bit LabVIEW will make 32-bit executables)
That's two of your "personalization" variables.
Given that, my guess (without seeing anything you're actually doing or trying to do) is that you're overthinking things here. Care to share some context to make it more clear why what you're doing is a path you want to travel?
10-19-2019 02:18 PM
It looks like you've defined several "conditional disable symbols" (a.k.a. project-level environment variables) in your project. This likely means there are several places in your code where you have conditional disable structures, containing code variations that will depend on your particular symbol values.
I've done this a little bit too, but not to the extent you have. I suspect you'd like a way to have your build spec pre-define various symbols before doing the build -- at least, that's the kind of thing I know I'd like.
With my lesser use of such symbols, I haven't made it a mission to pursue a nicer solution than just manually setting the values before doing the build. My little bit of poking about didn't reveal any simple straightforward way to have this be *part of* the build spec. I suspect it'd be possible if you were to make a special vi that used VI Server (and maybe scripting?) to set such variables within your project, make an interactive GUI for it, and then configure a pre-build action to call that vi.
That still seems messy though, if you want several different flavors of your executable based on several combinations of symbol values. Your vi would need to change not just the symbol values themselves, but also a bunch of settings related to the target executable name & path, version, etc.
If anyone knows of a simpler method, I'd like to know too.
-Kevin P
10-20-2019 10:14 AM
10-21-2019 03:09 AM
sorry about the late answer
hi natasftw
In fact, I'm using conditional symbols + disabled condition to simulate different contexts for execution: different company production plants, any machine, test database or normal database, no peripherals etc. for exemple PRODUCTIONPLANT = PARIS, TEST = TRUE.
then, the disabled conditional structures in my code are behaving depending of those parameters
when the executable is deployed, it automatically takes into account thoses parameters and conditional structures. that's a great point.
however, everytime I deploy one of my 6~7 executables, I need to manualy change 4~5 parameters. It's very boring, and if I forget to change one of them before the deployment of one executable, I can loose a lot of time during validation before realizing this forgetting
10-21-2019 03:12 AM
hi cbutcher
I think your solution can be the good one, but I don't find it in my labview 2016 library 😞
which version do you use?
is it possible from you to to save this vi in 2016 version and send me the file? 🙂
10-21-2019 10:47 AM
I believe it should be available in LabVIEW 2016 - this thread says it has been around since at least 8.6.
If you use the Add > File... (in Items View in the Project Explorer) or from a block diagram choose to "Select a VI..." you should be able to browse for it.
It will be in your installation directory (e.g. C:\Program Files (x86)\National Instruments\LabVIEW 2016) \resource\plugins\Utility\IfDef.llb\SetSymbols.vi (not vi.lib! Oops!)
10-21-2019 01:10 PM
Thanks for the pointer to "SetSymbols.vi"!
-Kevin P
10-22-2019 03:22 AM
hi cbutcher. thanks for the VI, it's working perfectly 🙂
The VI is processing only project variable and not project/current workspace variable. do you know if such VI has been developped? I can't find it in the library
thanks in advance
10-22-2019 03:29 AM
@Pierre_F wrote:
hi cbutcher. thanks for the VI, it's working perfectly 🙂
The VI is processing only project variable and not project/current workspace variable. do you know if such VI has been developped? I can't find it in the library
thanks in advance
shb in the linked thread has the following image (his/her work, not mine - if you like it you should give kudos to the post on the second page here: linked post)
You can see the way that the project reference is chosen between two different values and copy the appropriate choice in order to get the target of your definitions that you want.