Quantcast
Viewing all articles
Browse latest Browse all 5800

Is it possible to catch Rhino Onload event using Python

Is it possible to catch Rhino Onload event using Python, Like C#, Thanks!

public class CollapsibleSectionUIPlugIn : Rhino.PlugIns.PlugIn
{
public CollapsibleSectionUIPlugIn()
{
Instance = this;
}

public static CollapsibleSectionUIPlugIn Instance
{
  get; private set;
}

public void LoadCefglue()
{
  xc.CefRuntime.Load();

  var mainArgs = new xc.CefMainArgs(new string[0]);
  var cefApp = new MyCefApp();

  //if(xc.CefRuntime.ExecuteProcess(mainArgs, cefApp, IntPtr.Zero) == -1)
  //{ 
  //  return;
  //}

  var cefSettings = new xc.CefSettings()
  {
    MultiThreadedMessageLoop = true,
    LogSeverity = xc.CefLogSeverity.Disable,
  };

  xc.CefRuntime.Initialize(mainArgs, cefSettings, cefApp, IntPtr.Zero);
}

public override PlugInLoadTime LoadTime => PlugInLoadTime.AtStartup;

protected override LoadReturnCode OnLoad(ref string errorMessage)
{
  return LoadReturnCode.Success;
}

}

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 5800

Trending Articles