Exemplo n.º 1
0
        private Octave GetOctaveInstance()
        {
            if (GlobalSettings.Settings.OctavePath == "" && Environment.OSVersion.Platform == PlatformID.Win32NT)
            {
                throw new Exception("Octave binaries path not set (go to 'Edit' > 'General Settings' > 'Other' > 'DWSIM/Octave bridge settings').");
            }

            var octave = new Octave(GlobalSettings.Settings.OctavePath);

            octave.ExecuteCommand("addpath('" + Path.GetDirectoryName(Assembly.GetEntryAssembly().Location) + Path.DirectorySeparatorChar + "ECE')");
            octave.ExecuteCommand("cd '" + Path.GetTempPath() + Path.DirectorySeparatorChar + "'");

            return(octave);
        }