02-14-2019 11:05 AM
Hi all, am trying to build an application that allows a user to select a VI(strict typedef) to run.
My code works in the development environment but refused to run after I compiled it.
Please see as attached.
Can you help to advise what can I do to make them run?
Thank you
Regards,
Stonewall
02-14-2019 11:19 AM
I do not have LV 2018 but the most common cause of that symptom is the paths to VIs change in an exe.
The simplest solution is to use static references to the dynamic VI and let LV worry about including the VI and its path.
If the target VIs show the front panel, make sure you check the option to include FP in the build spec.
Ben
02-14-2019 11:20 AM
Hi Stonewall,
What do you mean by compiled it? Did you ctrl + click the run arrow to do a force compile?
Or do you mean building into an application? If this, then it's possible the dynamically called VIs were not included in the build.
Can you attach a single zip file containing your code saved for LV 2016 or earlier?
02-14-2019 11:21 AM
You can't load VIs by path when you make them into an EXE unless you build them into the EXE, and even then the path is different and you can't browse to it.
Your best bet is to include strictly typed static VI references in your code, which will ensure the VI is built in your EXE. Put down a "Static VI reference" from the Application Control palette, browse to the path of one of your dynamic VIs, and then right-click it to select the "strictly typed" option from the right-click menu.
02-14-2019 11:26 AM
@Kyle97330 wrote:
Put down a "Static VI reference" from the Application Control palette, browse to the path of one of your dynamic VIs, and then right-click it to select the "strictly typed" option from the right-click menu.
Instead of browsing, you can also drag the VI from several places, such as a subVI on the block diagram, the icon in the top right of an opened VI, or the project directory. I only mention because it was quite a revelation when I first found this out 🙂
02-15-2019 04:30 PM
Thank you all for providing me with the solution. My application is now working