I thought about resurecting my erlier thread but this is a more specific question than simply "How do I save something to a scenario?".
My problem is that I have 60+ switches in my VC and am looking to add more before I'm done. (still have the Cmd and Pilot's side-panels as well as CBs left to add) Now obviously writing each switch to the scenario individually would result in a massive file so I thought I'd adapt the technique I used in my Panel Initialization routine.
The problem is that I have no Idea how to go about writing an array to, or loading it from a scenario (text string) without writing each value individually.
If someone could help me out or point me towards a pertinent SDK sample it'd be much appreciated.
Here's my panel Initialization code for reference
My problem is that I have 60+ switches in my VC and am looking to add more before I'm done. (still have the Cmd and Pilot's side-panels as well as CBs left to add) Now obviously writing each switch to the scenario individually would result in a massive file so I thought I'd adapt the technique I used in my Panel Initialization routine.
The problem is that I have no Idea how to go about writing an array to, or loading it from a scenario (text string) without writing each value individually.
If someone could help me out or point me towards a pertinent SDK sample it'd be much appreciated.

Here's my panel Initialization code for reference
Code:
// Set initial switch positions
void SpiderLEM::InitPanel(void)
{
// Default switch positions for vessel when spawned by Scenario Editor
int P1_Init[17] = { 0, 0, 0, 0, 2, 2, 2, 2, 0, 2, 0, 2, 1, 1, 0, 0, 0}; // Panel 1 (Comander's console) switches
int P2_Init[18] = { 0, 2, 2, 0, 0, 2, 2, 0, 0, 2, 2, 0, 2, 2, 0, 2, 2, 2}; // Panel 2 (Pilot's console) switches
int P3_Init[25] = { 2, 2, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0}; // Panel 3 (Center Console) switches
// Set switch positions
for (int i = 0; i < 17; i++) P1_Switch[i] = (SwitchState) P1_Init[i];
for (int i = 0; i < 18; i++) P2_Switch[i] = (SwitchState) P2_Init[i];
for (int i = 0; i < 25; i++) P3_Switch[i] = (SwitchState) P3_Init[i];
}