LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

programatically controlling type def in multiple VI's

Is there a way on initialization to change a type def of a set of VI's and automatically propagate that through all of them? This would be very useful for debugging if when the VI is not running it would still be displaying the correct lables and things. I am trying to develop an intrument that instruments tree different machines and a lof of the Labels need to be changed from on to the other. It is a pain to do in all places, so something centralized would be very useful. Thanks

Eugene
0 Kudos
Message 1 of 5
(2,962 Views)
You could make them strict typ def and this would change them all as you want.

Joe



Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 2 of 5
(2,962 Views)
The problem with that is that I want to have the same type def VI contain different lables in different cases. Is there a way of doing this without keeping different VI's on different systems?
0 Kudos
Message 3 of 5
(2,962 Views)
I don't quite agree that what you are doing is right (if the labels need to be different, it sounds like you should have different typedefs), but I may have a way for you to do what you want.

The attached 7.1 llb has three VIs:
MyTypedef.ctl - simple typedef
UsesTypedef.vi - Uses the above typedef.
ModifyTypedefLabels.vi - Changes the internal label of an element of the typedef.

When you run Modify, it will change the label of the string control in the typedef. This change will be reflected in all VIs in memory that use the typedef.

Drawback: All VIs that use the typedef will have their modified bit set.

For you to use this, you would change modify to point at your typedef, use an enum to control which one of three sets of labels yo
u write, and change the write code to write all these labels.

Enjoy,
Roy
Download All
0 Kudos
Message 4 of 5
(2,962 Views)
Thanks!

This is what I was looking for, but you are also correct that it is better to use different controls. I have figured out a way of doing that, and will go that route.

Thanks

Eugene
0 Kudos
Message 5 of 5
(2,962 Views)