LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

saving vi programmatically build exe

Solved!
Go to solution

Hi all,

 

I want to save a vi programmatically and i can do it. I have used a sub vi (autosave-sub.vi) from this link: http://zone.ni.com/devzone/cda/epd/p/id/951
just change the case structure false condition to true, to save the vi even if there is no modification.


If you run the attached vi (untitled 1.vi), and click "add" button to add new value to combo box or click the "delete" button to delete a value from it. Then close the vi without saving. After these process, open and run the vi again, you will see values remained the same.


But when i build an exe, it does not work.  Do you have any idea how it works when build an exe or why it does not work? (i think invoke node in the sub vi causes this problem but not sure)

 

Best Regards.

Thanks!
~drycsr~
Download All
0 Kudos
Message 1 of 8
(3,677 Views)
Solution
Accepted by topic author drycsr

The Save Instrument method is not available in the run-time engine and requires the development environment running.

Remember that saving implies compiling the vi on the fly.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 2 of 8
(3,672 Views)

Thank you pincpanter!!

Is there any way that you know to keep the values same at run time? Let me ask the following, there is a way that i thought, but which one is more convenient, write values to the text file, tdms or binary file?

 

Best Regards.

Thanks!
~drycsr~
0 Kudos
Message 3 of 8
(3,645 Views)

What do you mean by "keeping the values the same"? The values of what, and what are you trying to keep, and the same to what?

 

If you're asking about saving control values so they can be repopulated at the next launch, this has been asked TONS of times. You need to use a configuration file. Do a search and you will come up with lots of hits, as well as complete examples. I'm not going to bother giving you a direct link because I'm sure you are more than capable of searching. Smiley Wink

0 Kudos
Message 4 of 8
(3,629 Views)

Hi smercurio_fc

 

You're right, my post was not clear enough, sorry.. I'd like to keep values ( which are added by me to combo box) when vi is closed without saving. ( e.g. maybe when a power failure occurs). And I know saving control values has been asked TONS TONS of times 🙂 Now, i will start to search use a configuration file 😉

 

Thank you so much!

 

Best Regards!

Thanks!
~drycsr~
0 Kudos
Message 5 of 8
(3,620 Views)

i have buid exe from vi

but exe is not running on other computer

please help

0 Kudos
Message 6 of 8
(3,543 Views)

You have posted a question in a message thread that is completely unrelated to your question.

 

Do you have the runtime engine installed on the other PC?

 

Please give some details about "not running".  What does it actually do or show?  Do you get any error messages?

 

Please post a new message in a new message thread if you still need some help with some details about your problem.

 

 

0 Kudos
Message 7 of 8
(3,538 Views)

Hello Reenus,

 

Here is a tutorial which should go over everything you need to know to build a LabVIEW application. Take a special look at the Installers (Windows) section.

http://zone.ni.com/devzone/cda/tut/p/id/3303

 

Thank you,

Vimal Fernandez

Applications Engineer
National Instruments
0 Kudos
Message 8 of 8
(3,514 Views)