With this C# snippet you can save all tabs to a List:
project.Lists["tabs"].AddRange(instance.AllTabs.Select(t=>t.Name).ToList());
There should be a List named "tabs" in your project.
Then you can activate tabs in any order you want by taking their names from the List.