LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

same property node for multiple intensity graphs

Hello everybody,

I've 18 intensity graphs displayed on my front panel (which is quite a lot). All these graphs have the same size (same number of rows and same number of columns).

I'd like to find a way to modify their style all together. I want for example apply the same x-y scale or the same z color scale for all my intensity graphs.

Is there a cleaner and easier way to do it than putting a property node for each of my graph? This is a way i dit it until now but I don't like that.

Thanks for your help.

Pierre,

0 Kudos
Message 1 of 7
(3,346 Views)

Create a reference for each graph (right-click..create reference) and build them into an array. Now autoindex  this array on a FOR loop and wire to a single property node inside the loop.

0 Kudos
Message 2 of 7
(3,338 Views)

I would pack all all of the graph references into an array and then loop through the array of references. Sounds like you may have multiple operations which would operate on the reference array.

 

EDIT: Altenbach is way too fast 🙂

0 Kudos
Message 3 of 7
(3,336 Views)

Wow, that was quick. Thanks a lot to both of you. I'm trying to implement that right now.

0 Kudos
Message 4 of 7
(3,322 Views)

You will also want to use the Defer Front Panel Updates (turn ON before the FOR loop and turn OFF after the FOR loop).  That will make this code run a little bit faster.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 7
(3,317 Views)

@crossrulz wrote:

You will also want to use the Defer Front Panel Updates (turn ON before the FOR loop and turn OFF after the FOR loop).  That will make this code run a little bit faster.


More importantly, make sure to write these properties only if things change and don't hammer the same properties over and over with every iteration of the outer loop. Put the suggested FOR loop (the one iterating over the references) inside a case structure.

 

Deferring the front panel updates is optional. See if you notice any lag.

0 Kudos
Message 6 of 7
(3,304 Views)
Ok thanks, I think this is what I did. I have a event structure around evrything. I added an event for each kind of property I want to modify on my intensity graphs. In this way I'm editing only what's required when going trough my auto indexed loop.
It works great. The only little thing is that my intensity graphs are on different tab on my front panel. And the x-y scales only update on graphs contained inside the opened tab when I trig my event. Do you know why?
Thanks again
0 Kudos
Message 7 of 7
(3,291 Views)