04-27-2018 06:13 AM
Hey,
I created a simple VI for some experimental testing. I put the Build.vi of the VI Application Builder into a new VI and created constant to the project-path, I wanna build.
After that I built an *.exe of my VI which contains the Build.vi (bexe.vi).
If I run my bexe.vi in my project-folder I get the following Error-Message:
code: 7
source: Methodenknoten in GetTargetBuildSpecs.vi->NI_App_Builder_API.lvlib:Build (path).vi->bexe.vi
Translated for English-speakers: Method-Node in GetTargetBuildSpecs.vi->NI_App_Builder_API.lvlib:Build (path).vi->bexe.vi
If I run my bexe.vi in main-folder of LabVIEW ("C:\Program Files (x86)\National Instruments\LabVIEW 2016") I get the following error: --> Thought this would be helpful, if LV doesn't change some paths at build from running a VI out of the LabVIEW.exe.
code: 1025
source: VI-Referenz öffnen in NI_App_Builder_API.lvlib:Build (path).vi->bexe.vi<APPEND>
VI-Pfad: <b>C:\Program Files (x86)\National Instruments\LabVIEW 2016\vi.lib\AppBuilder\BuildTarget.vi</b
Translation: Opening VI-Reference in NI_App_Builder_API.lvlib:Build (path).vi->bexe.vi<APPEND>
VI-Pfad: <b>C:\Program Files (x86)\National Instruments\LabVIEW 2016\vi.lib\AppBuilder\BuildTarget.vi</b
Can anybody help me with my problem? Do I have to modify any paths in my build-specification or do I have to do something else?
Thanks
Elias
04-27-2018 07:11 AM
Elias,
as the help for the function clearly states:
The Application Builder API VIs cannot be used in the LabVIEW Runtime Engine. Read: The VIs cannot be used inside of an EXE.
04-27-2018 07:28 AM
Oh thanks.
And what about cheating and building a DLL or some other kind of library, or does it use the Runtime Engine, too? Sorry about that stupid questions, but I just started using LabVIEW 2 weeks ago.
04-30-2018 02:39 AM
Hey,
even a LabVIEW built DLL uses the LabVIEW Runtime.
Best regards
05-02-2018 01:46 AM
To give you some useful instructions: Write a VI and use the LabVIEW command line parameter to call that VI. This enables your task while not hitting the wall.
The reason for the API not to work in pure runtime environment is that you use the compiler. This is not part of the runtime. Hence, running a build script requires the LV development environment anyways....
05-02-2018 02:41 AM
I already tried this. But the build.vi VI contains a bug, which prompts errors to a popupwindow, although if there are error-wires connected and I tried to get a workaround for this, by compiling my vi to an *.exe.
05-02-2018 03:11 AM
Build.vi contains no bug. At least, not for the case you mention. Simply, it was not designed to be used in a fully automated manner as you would like to do.
05-02-2018 03:21 AM
I called the NI-Support about that, they told me, it's a bug.
05-02-2018 08:26 AM
I did not encounter any error by using Build.vi. Do you mind sharing the information on that error?
05-02-2018 08:33 AM
@Norbert_B ha scritto:
I did not encounter any error by using Build.vi. Do you mind sharing the information on that error?
See this thread, especially the third post. If any error occurs during build, a dialog box appears even if the error output is wired.