Discussion:
Save graph setting to previous last used setting
(too old to reply)
Kirit
2008-08-05 15:10:08 UTC
Permalink
I have a query like, i acquire data and see them on graph and modify for appearance and i need same settings for next measurement also.
 
Let me make it simple, i do measurement and modify the curves like color,thickness. I save file as .csv or .zip file, then i close the system and open the measurement but i see the graph settings to default. which should not happen, i need the graph settings to previous used setting.
i guess i am clear about the description......let me know for any clarifications in the description. Any suggestions regarding this problem
 
-Kirit
Hillman
2008-08-05 15:40:08 UTC
Permalink
Hi Kirit,You may be able to save your graph properties by click edit>>make selected items default.. this certainly works for values, I'm not sure about graphs.However, a more programmatic way would be using property nodes, which can be made by right clicking on the graph indictor on your block diagram, going to create >> property node.. then select whatever property you need.Hope this gets you on your way,*edit: Yes using make selected items default seems to work.Message Edited by Hillman on 08-05-2008 04:28 PM
Hillman
2008-08-06 11:10:06 UTC
Permalink
Hi Kirit,
 
I have attached an example on the way of forcing the properties you wish in the code using property nodes.
 
In the example I chose the line colour to be blue. If you save the file. And re-open it, it does remember the last settings associated with the chart.
 
Hope this helps
 
 


example of property node.vi:
http://forums.ni.com/attachments/ni/170/347005/1/example of property node.vi
Kirit
2008-08-13 22:10:04 UTC
Permalink
(Hi Kirit,
I made an example to illustrate, how to restore the manually made settings.
Greets, Dave

&nbsp; <a href="http://forums.ni.com/ni/attachments/ni/170/347420/1/example%20of%20property%20node%20mod_LV851.vi" target="_blank"><img src="Loading Image..." border="0" alt="Attachment" hspace="5" width="22" height="22"></a> <a href="http://forums.ni.com/ni/attachments/ni/170/347420/1/example%20of%20property%20node%20mod_LV851.vi" target="_blank"> example of property node mod_LV851.vi</a> (49 kb) &nbsp;DaveThe example(<a href="http://forums.ni.com/ni/attachments/ni/170/347420/1/example%20of%20property%20node%20mod_LV851.vi" target="_blank"><img src="http://ni.i.lithium.com/i/global/icon_attachment.gif" border="0" alt="Attachment" hspace="5" width="22" height="22"></a> <a href="http://forums.ni.com/ni/attachments/ni/170/347420/1/example%20of%20property%20node%20mod_LV851.vi" target="_blank"> example of property node mod_LV851.vi</a> ( ) &nbsp;what you posted is&nbsp;not working if we make any changes in color or line width and close without save. It should restore the previous settings but it is not in this case.It is a good example you posted but some how not working. The version i am using is LV8.5 so there should be no problem i guess.Anyway lets see...thanks&nbsp;Kirit&nbsp;&nbsp;
daveTW
2008-08-14 12:10:05 UTC
Permalink
Hi Kirit,this is actually a quite simple VI and there are only a few reasons, why it shouldn't work. - You should check if the&nbsp; &quot;Graph-Props.ini&quot; is saved properly after stopping the VI.
- The VI has to be stopped with the &quot;STOP&quot;- button, not the &quot;Abort Execution&quot;- button from the button bar
- Write permissions to the LabVIEW- &quot;Default Data Directory&quot; are necessary to save the INI-file properly
Greets, Dave

Kirit
2008-08-05 16:40:09 UTC
Permalink
Hey Hillman
Thank you for the reply. Graph settings in the sense like color,style,thickness etc of the curves. I have checked with the property node but couldn't get an idea how i can assign the values which are to be re-trived.
Can you please&nbsp;gve a example showing how to assign the values or parameters which are to be re trieved again when we re-open the file for measurement.
Thank you
Regards
Kirit
Kirit
2008-08-06 17:10:11 UTC
Permalink
Hey Hillman
&nbsp;
First of all thank you for the example!
&nbsp;
(In the example I chose the line colour to be blue. If you save the file. And re-open it, it does remember the last settings associated with the chart.), but when i change the range and save, its not getting updated. It remains in the same setting.
&nbsp;
Ok lets assume this works with this VI, but in real time we have a got .exe file to run the application. I dont think if we make any changes in the chart(color,font,size)&nbsp;executed by exe file&nbsp;will get updated and remember the last settings associated with the chart.
&nbsp;
Any suggestions regarding this
&nbsp;
Thank you
Kirit
daveTW
2008-08-07 09:40:09 UTC
Permalink
Hi Kirit, I made an example to illustrate, how to restore the manually made settings.Greets, Dave


example of property node mod_LV851.vi:
http://forums.ni.com/attachments/ni/170/347420/1/example of property node mod_LV851.vi
Hillman
2008-08-07 08:40:20 UTC
Permalink
Hi Kirit,
&nbsp;
Thanks for your comments.
&nbsp;
The range property should behave in exactly the same way - or at least it does for me.
&nbsp;
So if I use a property node (x-scale&gt;&gt;range) and set the min value to 0 and the max value to 100, then the range on the x-axis is always 100.. obviously as time goes by you may see 1000 - 1100. Similarly, if you manually alter the x-axis range by clicking on the numbers and changing them to 0 and 100, and save, close and re-open this will also have the same effect - just as before. However, a word of warning, you need to turn off auto x scaling because this over-rides the property nodes/default settings at run time.
&nbsp;
As for the real time exe this will work. There are some differences between the way a code works in real time compared to normal operation but the front panel behavior is not one of them.
&nbsp;
If you are still having issues, please post an example code which shows your issue.
&nbsp;
Thanks and have a nice day,
Loading...