ASalcedo Posted January 13, 2017 Report Posted January 13, 2017 Hello to all. I would like to know hoe can open my VI with the same configuration. I mean with every indicators, controls, graphs... are equal than when Labview was closed the las time. Is it that possible? I am asking this because I am developing a vision application with vision and motion toolkit. And a ROI is changed every time when I run again Labview in the same position of display. Thanks a lot. Quote
ensegre Posted January 13, 2017 Report Posted January 13, 2017 You have to code it yourself in a way or the other. For example having your VI save the important values in some kind of config file on exit, and read them in (if the file is present) first thing on start. Your choice whether to dump plainly the control values in a binary file (inflexible and obfuscated), to use a standard format like xml or json, or a plain format of your design for human readability, and how to treat file errors and make room for future changes. OpenG should have something in this direction, never used. Another way may be invoking "Make current values default" and then saving the VI, programmatically. I find the first solution preferable in general. Quote
ASalcedo Posted January 13, 2017 Author Report Posted January 13, 2017 On 1/13/2017 at 9:13 AM, ensegre said: You have to code it yourself in a way or the other. For example having your VI save the important values in some kind of config file on exit, and read them in (if the file is present) first thing on start. Your choice whether to dump plainly the control values in a binary file (inflexible and obfuscated), to use a standard format like xml or json, or a plain format of your design for human readability, and how to treat file errors and make room for future changes. OpenG should have something in this direction, never used. Another way may be invoking "Make current values default" and then saving the VI, programmatically. I find the first solution preferable in general. Expand Thanks a lot. I am gonna try the first sollution you mentioned.! Quote
ensegre Posted January 13, 2017 Report Posted January 13, 2017 On 1/13/2017 at 9:13 AM, ensegre said: OpenG should have something in this direction Expand See http://forums.ni.com/t5/Example-Program-Drafts/Create-Configuration-Files-INI-for-Your-LabVIEW-VIs/ta-p/3536260 1 Quote
ASalcedo Posted January 13, 2017 Author Report Posted January 13, 2017 On 1/13/2017 at 9:27 AM, ensegre said: See http://forums.ni.com/t5/Example-Program-Drafts/Create-Configuration-Files-INI-for-Your-LabVIEW-VIs/ta-p/3536260 Expand In the first look I think that is what I need exactly!! Thanks.! Quote
hooovahh Posted January 13, 2017 Report Posted January 13, 2017 A pretty common technique that works for the simple cases, is to use the OpenG Write Panel to INI, and Read Panel From INI. This will take all the control on the front panel and save their current values to an INI file. The reverse can take the INI file and put the values back on the controls. These functions are found in the Variant Configuration OpenG package. Quote
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.