Jump to content

"VI Name" property in compiled code throws error


Recommended Posts

When running the attached code in Dev environment, no problems but as soon as the code is compiled the setting of the "VI Name" throws an error. I'm using a template VI and then launching multiple instances but I'd like to name each VI created so that the operator knows which test station the VI is tied to (i.e. "Test Station 1", "Test Station 2"). The code works well up until the setting of the aforementioned property (reference is opened, EFT_Ctrl data is passed and the cloned VI is opened then comes the error). Any ideas on how I can make this work in an executable?

Thanks,

Randy

post-3040-1199386309.jpg?width=400

Link to comment

Probably I am mistaken, but.... It seems to me, that the bit of your code contains an error...

The file path EFT_TS_DF.VI in.exe a file will be found not truly... As function "Current VI path" will give longer path than in case of operation from LabVIEW environment...

For definition of correct path I use a following code...

Link to comment

QUOTE(psi @ Jan 4 2008, 01:09 AM)

Probably I am mistaken, but.... It seems to me, that the bit of your code contains an error...

The file path EFT_TS_DF.VI in.exe a file will be found not truly... As function "Current VI path" will give longer path than in case of operation from LabVIEW environment...

Actually, it would work if you include the VIT in the build (which is probably what Randy did, because he says the VI does open).

To really cover all cases, you should use Strip Path in a loop with a shift register and stop the loop by checking the Is Directory? output of the File/Directory Info primitive (and account for invalid and empty paths).

Link to comment

QUOTE(jpdrolet @ Jan 3 2008, 01:03 PM)

The VI Name property refers to the VI file name on disk and can't be set in run-time because an app can't save a VI

Try FP.Title instead to change the ttile of the window.

That did it...I knew it was something I was missing. Thanks for the help. :thumbup:

Randy

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.