Thomas Granito Posted February 1, 2023 Report Share Posted February 1, 2023 I have a problem. I have a state machine in wich i have this asynchronous calling of a subvi. When i run the vi there are no problem. I made the executable of this vi and when i call this event, it doesn't show me the subvi on the subpanel. I don't know where is the problem Quote Link to comment
ensegre Posted February 1, 2023 Report Share Posted February 1, 2023 https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019NYXSA2 https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P8MGSA0 Quote Link to comment
Antoine Chalons Posted February 1, 2023 Report Share Posted February 1, 2023 Hi Thomas, First, you need to make sure that your dynamically launched VIs are included into the EXE, to do that, in the build specs, in 'Source Files' you have to add these VIs in the "Always Included" list. Then there path for these VIs will not be the same when you run the code and when you run the EXE - in source the VI path is C:\Users\thomas.granito\Desktop\ProjectName\Test.vi - in EXE it will be C:\<where-ever-your-EXE-is>\App.exe\Test.vi So the easiest will probably be to use a relative path to the main VI. 1 Quote Link to comment
Thomas Granito Posted February 1, 2023 Author Report Share Posted February 1, 2023 Thank you to all Quote Link to comment
hooovahh Posted February 1, 2023 Report Share Posted February 1, 2023 I think all you need is a static VI reference, and then use the VI's name to open a reference instead of the file path. Here is an example I made years ago. https://forums.ni.com/t5/LabVIEW/building-an-executable-with-vits-with-Labview-2011/m-p/2384984#M740405 By dropping a static VI reference, LabVIEW knows it needs to include it in the built application as a dependency. It will then be in memory, and you can just reference it by name. If you actually want to replace the VI used at runtime, with one on disk, then yes you need the path to be a known good path. But if you just want to open a reference to a thing, and have it be included in the build, a static VI reference is the way to go. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.