From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

App Builder with dynamically loaded VI - please help

Solved!
Go to solution

Hello,

Please take a look at the attached ZIP file with sample project. Caller loads a sub dynamically. It works well in the development environment (LV 2011) but when I build the EXE, it stops working. Please take a look; ideally, repost fixed project in this thread so others can benefit from how to fix this... 

Thank you !

JorgeinSD

0 Kudos
Message 1 of 3
(2,112 Views)
Solution
Accepted by topic author jorgeinSD

Hi Jorge,

 

it's the ususal problem: in the executable the path to your dynamically loaded VI changes.

 

You have set it to be included in the executable. So the path will change to Appdir\DynLoad.exe\LoadMeDynamically.vi, but you try to open the path AppDir\LoadMeDynamically.vi...

 

Options:

- check the runtime environment (by property node) to decide which path to use

- change the location of the VI to "support directory", it will be a folder named "data" next to your executable. Call the VI from that folder. You can do the same inside your project to have same calling conventions in development and runtime environment...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 3
(2,103 Views)

Thank you GerdW !

It worked well. I read a few responses to this issue in other posts but I wasn't getting it though I knew I was close so I decided to post this example to help in the explanation.

The working project is attached.

JorgeinSD

0 Kudos
Message 3 of 3
(2,088 Views)