Is there any function or method to get the name of the sol file loaded in the simulation? For example, with the default distribution I should get "Sol.cfg".
char Sol[256];
oapiReadItem_string(scn,"System",Sol);
It should work, but it's not a vessel, it's a Celbody dll and afaik there isn't an equivalent function.
oapiReadItem_string(scn,"System",Sol);
It should work, but it's not a vessel, it's a Celbody dll and afaik there isn't an equivalent function.
Is there any function or method to get the name of the sol file loaded in the simulation? For example, with the default distribution I should get "Sol.cfg".
Wait... if it's a cellbody, how do you not know which system it is in by default? Don't you usually code a cellbody for a specific system?
Why do you need that?
It seems that Orbiter doesn't get angry if I append some (commented) lines in the file Sol.cfg (or whatever it's called) and since I wrote a Celbody that moves any generic (multiple star) system, I need to write somewhere the initial state of the bodies; the Sol.cfg file (specially created for the wanted stellar system) would be the perfect place.
If I don't know the sol.cfg file name, I can take two ways: use a configuration file for my dll (my current choice) or use a Sol.cfg with only a given name (like "Generic_sol.cfg").
Name = mySol
Star1 = Sun
Planet1 = myPlanet
Planet2 = mySecondPlanet
Name = myPlanet
Module = cristiapisGenericModule
<some more parameters for the module>
Name = mySecondPlanet
Module = cristiapisGenericModule
<some different parameters for the module>