Skip to content

Commit f5fe1d9

Browse files
committed
plugin root folder
1 parent 753010a commit f5fe1d9

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

MainWindow.xaml.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,17 +67,24 @@ void Host_ConsoleCreated(object sender, EventArgs e)
6767

6868
void Console_ConsoleInitialized(object sender, EventArgs e)
6969
{
70+
string assemblyLocation = System.Reflection.Assembly.GetExecutingAssembly().Location;
71+
string assemblyPath = System.IO.Path.GetDirectoryName(assemblyLocation);
72+
73+
74+
ICollection<string> paths = console.Pad.Console.ScriptScope.Engine.GetSearchPaths();
75+
paths.Add(assemblyPath);
76+
console.Pad.Console.ScriptScope.Engine.SetSearchPaths(paths);
7077
string startupScipt = "import IronPythonConsole";
7178
ScriptSource scriptSource = console.Pad.Console.ScriptScope.Engine.CreateScriptSourceFromString(startupScipt, SourceCodeKind.Statements);
7279
try
7380
{
7481
scriptSource.Execute();
7582
}
7683
catch { }
84+
/*
7785
double[] test = new double[] { 1.2, 4.6 };
7886
console.Pad.Console.ScriptScope.SetVariable("test", test);
79-
//_rhinoCore = new Rhino.Runtime.InProcess.RhinoCore(new string[] { "-appmode" }, Rhino.Runtime.InProcess.WindowStyle.Normal, null);
80-
87+
*/
8188
}
8289

8390
void MainWindow_Initialized(object sender, EventArgs e)

0 commit comments

Comments
 (0)