01-03-2016 06:03 AM
I have a waveform graph setup with width, length size, color, line style, scaling and what not.. I have an idea that I will make a VI that accepts a waveform graph reference, then in the VI it will copy a base model with properties that I want over to the input waveform reference. What is the easiest way that I can achieve that ?
I could manually setup each property node one by one, but that is too much work and I don't feel it is a smart way...
01-03-2016 07:17 AM
I'm not sure what you are trying to do. You have a Waveform Chart -- where is it displayed? Is it being "created" in one VI and displayed in another? Are you trying to encapsulate the "setting of Chart Properties" in a sub-VI called by the routine that has the Chart? [I've done this, myself, so that the routine that actually handles the display, the arranging of data onto the chart, can "hand off" to sub-VIs the "Set Chart Scales", "Label Chart Plots" and "Set Plot Colors" to sub-VIs].
If your Chart properties are likely to be fixed (for example, you are always plotting 3 channels, you want them to auto-scale, they are labelled "Temp", "Pressure", "Volume", their colors are "Red", "Green", and "Blue", and you are plotting two as lines and one as symbols, you can set that up "by hand" in the Chart Properties (not using Property nodes, but right-clicking the Chart and choosing "Properties", and they will "stick".
Can you clarify the question?
Bob Schor
01-03-2016 04:59 PM
zigbee1 wrote:
[...] I have an idea that I will make a VI that accepts a waveform graph reference, then in the VI it will copy a base model with properties that I want [...]
"make a VI" and "copy" make me think you're not trying to do this in an executable (you can't make a VI in an executable). You could simply use scripting to copy the graph from the reference and paste/replace in the target VI.
What am I missing?
01-03-2016 05:41 PM
Hello, perhaps I was a bit unclear. Let say the indicator discussed is not a graph but could be anything, numeric control, plot, graph, .... So I was thinking there might be a property node that returns all possible properties node of the referenced object. Then I can wire those to a for loop and hence copy/clone the referenced object to something I prepared beforehand. Of course I could have Ctrl + Mouse drag to do that but what I want is the ability to programatically clone the appearance/settings of an indicator.
Simplest scenario would be, during runtime, user can change the total appearance of a waveform graph. It is still the same graph, but its property nodes settings got mass changed.
01-03-2016 05:50 PM
I certainly don't understand what you are trying to do, nor why it would be important. Why don't you develop some code, present it to us, and then say "Now this code works, but I want to be able to change the ..." and you tell us explicitly what you now want the code to do.
Bob Schor
01-03-2016 05:52 PM
I certainly don't understand what you are trying to do, nor why it would be important. Why don't you develop some code, present it to us, and then say "Now this code works, but I want to be able to change the ..." and you tell us explicitly what you now want the code to do.
The important things is, next time please present code that illustrates what you are describing. I have the feeling that we're trying to solve a problem for you that is a "curiousity", not connected to any "real" project -- I don't know about my colleagues, but as much as I love to teach, I don't have time for these mysteries ...
Bob Schor
01-04-2016 02:08 AM
01-04-2016 03:59 AM
I would do something like this:
There's a waveform graph on the front panel of the SubVI which has been configured/styled appropriately, you can drag the property node down to select which properties you want to apply to the new graph (you probably wouldn't want to write the history if you were just 'styling' a graph, for example - so writing *all* properties isn't appropriate in most cases).
The other option is to create a copy of the waveform graph in the development environment, either by copy+paste or using scripting, it will inherit the properties of the original.
01-04-2016 04:27 AM
Hi Zigbee1,
I already done that to save and import graph and all properties. (Cursor...)
I send you some VI I made. A package will come soon. Hope this will help.
Best regards.
01-04-2016 08:46 AM
It seems to me that if the Chart/Graph properties can be "set in stone" during Development, that is, you can (somewhere) create a Chart/Graph that is set up exactly the way you want, complete with scales, colors, line styles, etc., there is a very easy way to make sure that all of your Chart/Graphs use the same settings -- create a Strict TypeDef of the "Model" Indicator and use it wherever you need to lay down a similar Control/Indicator.
Or is this too easy?
Bob Schor