Randy Posted January 4, 2008 Report Share Posted January 4, 2008 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 Quote Link to comment
jpdrolet Posted January 4, 2008 Report Share Posted January 4, 2008 QUOTE(Randy @ Jan 3 2008, 01:53 PM) 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 http://lavag.org/old_files/monthly_01_2008/post-3040-1199386309.jpg' target="_blank"> 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. Quote Link to comment
psi Posted January 4, 2008 Report Share Posted January 4, 2008 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... Quote Link to comment
Yair Posted January 5, 2008 Report Share Posted January 5, 2008 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). Quote Link to comment
Randy Posted January 6, 2008 Author Report Share Posted January 6, 2008 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 VITry 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 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.