Hello, I got trouble when I load my plugin.
I developed plugin with wpf and reactiveui and visual studio 2017.
- condition: solution Configuration is
Debug
When I set solution Configurations toDebug
and start rhino6 using visual studio, Install my plugin is Ok.
But, when I open rhino.exe and install my plugin, rhino 6 suddenly closed.
- condition: solution Configuration is
Release
When I set solution Configurations toRelease
and start rhino6 using visual studio, Loading plugin return error and message is below image.
.
But, when I start visual studio again, plugin is already installed.
When I open rhino.exe and install my plugin, rhino 6 suddenly closed samely Debug
condition
In my guess, when I create DockBar, rhino is closed.
var createOptions = new DockBarCreateOptions
{
DockLocation = DockBarDockLocation.Left,
Visible = true,
DockStyle = DockBarDockStyle.LeftAndRight,
FloatPoint = new System.Drawing.Point(0, 0)
};
this.MyDockBar = new MainViewDockBar();
this.MyDockBar.Create(createOptions);
public class MainViewDockBar : DockBar
{
private readonly MainView mainView;
public MainViewDockBar()
: base(MyRhinoCAMPlugIn.Instance, BarId, "WPF")
{
this.mainView = new MainView();
this.SetContentControl(new WpfHost(this.mainView, null));
}
public static Guid BarId => new Guid("{c520731e-376a-4d82-975a-403664fca2fc}");
}
this is my creating dockbar code.
I don’t know why my plugin can’t load.
If I change CreateDockBar
to Rhino_DotNet version, No error happen
this.MainView = new MainView();
ElementHost host = new ElementHost
{
Dock = System.Windows.Forms.DockStyle.Fill,
Child = this.MainView
};
MRhinoUiDockBar dockBar = new MRhinoUiDockBar(Guid.NewGuid(), "myDockBar", host);
MRhinoDockBarManager.CreateRhinoDockBar(
this,
dockBar,
true,
MRhinoUiDockBar.DockLocation.left,
MRhinoUiDockBar.DockStyle.left_and_right,
new System.Drawing.Point(200, 200));
My rhino version is recent version 6.13.
-Kyungmin