I'm sorry that I don't know much about this. I want to make an interface for orbiter 2016. I can choose my own scene file for simulation, but I haven't found a tutorial on thisdll is created by coding in a visual studio, but I think for the launch pad you can do with the usual config
I want to resign the orbiter launchpad for more using
I want to make a client like multiplayer, which can use orbiter's own engine to select its own scene for simulation.I have no idea from this sentence, what you are planning to do. Can you devote some more letters to your question?
dll is created by coding in a visual studio, but I think for the launch pad you can do with the usual config
Can I add the function of launchpad through DLL plug-in? If so, can I get a tutorialCould be two very different things : create a custom launch facility with animated stuff such as fueling umbilicals, etc... in this case, yes you should implement it as a dll vessel,
or it could be a redesign of the Orbiter Launchpad app, which is a completely different thing....
Can I add the function of launchpad through DLL plug-in? If so, can I get a tutorial
I want to make a client like multiplayer to realize the function of selecting the scene file set by myself for simulationWhat is a launchpad for you ? We simply don't understand what you mean. In american/english, a launchpad designs the area or the structure on which rockets stand prior to launch.
Maybe try to write it in your native language, with some luck Google Translate will help us ?
What I want to know is how to pop up a dialog box and display some specific scene files after checking the module, and then directly select the corresponding scene file in the module to call the orbiter for simulation,thanksThat is quite some hack, but you can find the code in the OMP distribution. Basically the module finds the Orbiter window handle, then finds the various controls for that window, then uses native window messages to manipulate the controls (e.g. replace the launch button, disable the scenario selection, selecting the placeholder scenario) and opens a dialog window. The module's own "connect" button is used to start the login sequence, and if it comes to actually launching the session, the hidden "launch" button is remotely clicked to initiate Orbiter's code.
However in my current project, I found that a better way to handle this is to create a separate application that configures Orbiter via config-file, creates a temporary scenario file, and then launches Orbiter with command-line parameters to immediately start into the temp scenario. The launcher app can then wait on the process to return and do some housekeeping on it (e.g. delete the temp scenario, restore config-file, clean-up auto-save scenario, etc.).
The corresponding code was not found in OMPClient.cppThat is quite some hack, but you can find the code in the OMP distribution. Basically the module finds the Orbiter window handle, then finds the various controls for that window, then uses native window messages to manipulate the controls (e.g. replace the launch button, disable the scenario selection, selecting the placeholder scenario) and opens a dialog window. The module's own "connect" button is used to start the login sequence, and if it comes to actually launching the session, the hidden "launch" button is remotely clicked to initiate Orbiter's code.
However in my current project, I found that a better way to handle this is to create a separate application that configures Orbiter via config-file, creates a temporary scenario file, and then launches Orbiter with command-line parameters to immediately start into the temp scenario. The launcher app can then wait on the process to return and do some housekeeping on it (e.g. delete the temp scenario, restore config-file, clean-up auto-save scenario, etc.).
What I want to know is how to pop up a dialog box and display some specific scene files after checking the module, and then directly select the corresponding scene file in the module to call the orbiter for simulation,thanks
The corresponding code was not found in OMPClient.cpp
Thank you very much for your patience. I still have two questions: First, can I use C++ to build a startup program? Secondly, is the input of the command line performed in the startup program I created?As I wrote, the method used by OMP is quite some hack. If you are not able to find the corresponding code in the file mentioned after my description (it contains comments like "Find Orbiter's main windows"), chances are you won't understand what you are doing there. It is definitely not standard Orbiter module behavior and not trivial to achieve.
Therefore I'd suggest to follow the second approach I wrote about: create a launcher application in the technology you are comfortable in, then launch Orbiter via command-line arguments to run a specific scenario. The command-line argument for this is "-s <c:\path\to\scenario\file.scn>". I think you will have quicker results that way.
As I wrote, the method used by OMP is quite some hack. If you are not able to find the corresponding code in the file mentioned after my description (it contains comments like "Find Orbiter's main windows"), chances are you won't understand what you are doing there. It is definitely not standard Orbiter module behavior and not trivial to achieve.
Therefore I'd suggest to follow the second approach I wrote about: create a launcher application in the technology you are comfortable in, then launch Orbiter via command-line arguments to run a specific scenario. The command-line argument for this is "-s <c:\path\to\scenario\file.scn>". I think you will have quicker results that way.
I still have two questions: First, can I use C++ to build a startup program? Secondly, is the input of the command line performed in the startup program I created?
var startInfo = new ProcessStartInfo("cmd.exe")
{
Arguments =
$"/C {(LaunchRegularOrbiter ? "orbiter.exe" : "Modules\\Server\\orbiter.exe")} -s \"{scenarioPath}\"",
UseShellExecute = false,
CreateNoWindow = true
};
var orbiter = Process.Start(startInfo);
await Task.Run(() => orbiter.WaitForExit());
To run the "NG-Version" you have to do thing a little different (as seen in the C# code of face):Also note that I did not use the orbiter_ng.exe, but the orbiter.exe in the server path, because otherwise the "-s" option is not forwarded to OVP Orbiter.
Modules\Server\orbiter.exe
(note the different path)-s "{scenarioPath}"
(same as in "regular orbiter")You can use whatever you want to build the startup program, because it is a separate application. In my current project I used .NET WPF technology to build the launcher.
Your startup program has to launch the Orbiter executable with the appropriate command line, yes. In my case, from .NET, it was like so:
Code:var startInfo = new ProcessStartInfo("cmd.exe") { Arguments = $"/C {(LaunchRegularOrbiter ? "orbiter.exe" : "Modules\\Server\\orbiter.exe")} -s \"{scenarioPath}\"", UseShellExecute = false, CreateNoWindow = true }; var orbiter = Process.Start(startInfo); await Task.Run(() => orbiter.WaitForExit());
Note the "cmd.exe" trick, which is to achieve a waitable call (WaitForExit). Also note that I did not use the orbiter_ng.exe, but the orbiter.exe in the server path, because otherwise the "-s" option is not forwarded to OVP Orbiter.