Rhino 8 ScriptEditor - Managing local assemblies ( SampleCSWpf - Example)

Hey,

Is there a better way to deal with local managed assemblies with the new Rhino 8 Script-Editor (which I really like!)?

I tried (successfully) to execute the Rhino Developer “simpleCSWpf” example with the Script Editor, but referencing the local dlls one by one in every script seems a little bit weird. Did I get somethign wrong? Is there a more elegant way, Especially when dealing with multible scripts in a plugin?

The code:

#r "../SampleCsWpf.dll"
#r "C:\Program Files\Rhino 8\System\RhinoWindows.dll"
#r "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\PresentationFramework.dll"
#r "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\PresentationCore.dll"
#r "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\WindowsBase.dll"

using Rhino;
using Rhino.Commands;
using RhinoWindows;

using SampleCsWpf;
using SampleCsWpf.Views;

var dialog = new SampleCsWpfDialog();
dialog.ShowSemiModal(RhinoApp.MainWindowHandle());

Greetings from Madrid,
Leon

For now this is the way :smiley: But you don’t need to reference them directly as the are loaded already in Rhino

#r "RhinoWindows.dll"
#r "PresentationFramework.dll"
#r "PresentationCore.dll"
#r "WindowsBase.dll"

Rhino 8 is using Eto for the UI framework (which in turn uses WPF on Windows). Why not using Eto for your UI code?

1 Like

Oh. Much nicer! :smiley: That makes more sense. Thank you Ehsan! Well, i am used to the visual editor + wpf in Visual Studio. Getting into eto is something for the future…

1 Like

The future is now.

1 Like