Jump to content

vi path for asynchronuos call in labview executable


Recommended Posts

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.

 

  • Like 1
Link to comment

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.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.