Error
My RhinoCommon plugin is executing an external executable. I don’t receive any error while debugging the plugin locally.
But when I push the plugin to Rhino3D server and try to download, install, and run it, I receive this error:
Finite elements…
Error on process start: The system cannot find the file specified
Code
Here is the code to execute the external executable:
protected override Result RunCommand(RhinoDoc doc, RunMode mode)
{
RhinoApp.WriteLine("Finite elements...");
Helper.RunLogicWithLog("finite_elements.exe", args, runFEA);
return Result.Success;
}
public static void RunLogicWithLog(string exePath, string args, PostProcess pp)
{
cmd = new Process();
try
{
cmd.StartInfo.FileName = exePath;
cmd.StartInfo.Arguments = args;
cmd.StartInfo.UseShellExecute = false;
cmd.StartInfo.CreateNoWindow = true;
cmd.StartInfo.RedirectStandardOutput = true;
cmd.StartInfo.RedirectStandardError = true;
cmd.StartInfo.RedirectStandardInput = true;
cmd.EnableRaisingEvents = true;
cmd.OutputDataReceived += new DataReceivedEventHandler(cmd_LogReceived);
cmd.ErrorDataReceived += new DataReceivedEventHandler(cmd_LogReceived);
cmd.Exited += new EventHandler(cmd_Exited);
cmd.Exited += new EventHandler(pp);
cmd.Start();
// Begin asynchronous log.
cmd.BeginOutputReadLine();
cmd.BeginErrorReadLine();
}
catch (Exception ex)
{
RhinoApp.WriteLine("Error on process start: {0}", ex.Message);
}
}
Executable location
I double-checked the plugin installation. I can confirm that the external executable is actually next to my plugin RHP file:
Question
I have the external executable next to my RHP file. So, why it cannot be found?