LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

copy all properties node of one control/indicator to another ?

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...

0 Kudos
Message 1 of 11
(5,439 Views)

 

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

0 Kudos
Message 2 of 11
(5,417 Views)

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?
Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 3 of 11
(5,379 Views)

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.

0 Kudos
Message 4 of 11
(5,368 Views)

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

0 Kudos
Message 5 of 11
(5,360 Views)

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

0 Kudos
Message 6 of 11
(5,353 Views)
Hi everybody,
I understand that He wants to set all property nodes (ie range, colors, scales end so on) from a control to another one in the same type: graph 2 graph, ring2ring etc.
Now to do that we need to chose in edit mode one by one every property. when the vi runs only the chosen properties are copied to the other control.
The hope is that there was a "global" property that include all possibile for the selected kind of control.
Franco
0 Kudos
Message 7 of 11
(5,312 Views)

I would do something like this:

2016-01-04_09-56-27.png

 

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.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 8 of 11
(5,291 Views)

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.

Sabri JATLAOUI - Certified LabVIEW Architect - Certified LabVIEW Developer
Download All
0 Kudos
Message 9 of 11
(5,278 Views)

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

0 Kudos
Message 10 of 11
(5,246 Views)