I'm curious if anyone has ever run into this before and how they deal with it.
Here's my problem:
I have 1 program that depending on which location/setting it is used in ( currently only 3 options here) it has a different front panel appearance (ie. BGcolor, text colors, boolean colors, plot colors, line styles, etc.) My world would be much easier if everyone could just agree, but that's not going to happen (which is good in a way because it keeps me employed.) Oh and also for each of these locations, when the user prints the screen I have to change all the controls to another appearance.
I'm weighing a few options:
As far as actually updating the control properties
1. I could do the brute force method and have a case structure in the init stage of every VI that is displayed and use proprty nodes to set every control/indicator based on which location/setting I am in. Not elegant at all but it works. Not exactly very expandable either. Everything is pretty much hardcoded unless maybe I read it in from an .ini file. Also a lot of duplicated code. If I have a particular graph that appears on 3 screens and is handled the same way, I have to repeat the code 3 times. Maybe I make a subvi - who knows.
2. I looked at xcontrols and having a method for each xcontrol something like set color scheme, but from what I can figure replacing all of the controls with xcontrols would be a complete waste of time.
3. The most promising appears to be using vi server because we have a splash screen that loads all of the VIs so when I load each one I can set the properties of each control using property nodes and references.
4. There has to be some way to incorporate classes and dynamic dispatching into method #3.
As far as managing the different schemes:
1. I could read all the info from an ini file - seems straightforward
2. If I classes perhaps I could create a child class for each location and one for the print settings for each location.
If anyone has any thoughts or ideas it would be nice. This seems like a pretty overwhelming problem and I'm just trying to wrap my brain around it. I figure no matter what it's going to take a lot of effort, but I figure any planning I can do ahead of time will really pay off in the end. Of course I'd like to come up with somehting that is readable, scalable, and maintainable. Knowing the people that I'm dealing with their liable to change their minds 20 times yet today about what colors they want and what line types, etc.