rhino.inside
rhino.inside copied to clipboard
Creating Rhino Viewport in AutoCAD pligin only works if the application is Hidden - undesirable
@kike-garbo
We need to add a Rhino viewport to our WPF application in AutoCAD. Its easy enough, however there is one issue:
- Rhino has to be launched at best, using
WindowStyle.Hidden
, as I assume the UI in Rhino must be loaded to use UI components.
While this isn't the end of the world, it causes two problems:
- Slower start-up times.
- The Rhino splash screen displays which we don't want to see.
We've found Rhino.UI.Dialogs.KillSplash()
but this kicks in after a few seconds, meaning the splash screen still displays. We do not want the splash screen visible at all - similar to Rhino Inside Revit. And before you ask, we've used the same viewport control in Revit add-ins and it works just fine, so there must be a way of achieving the same result using Rhino in AutoCAD. Can you help?
Update:
I looked at the RiR repo and discovered one can do this to hide the splash screen:
args.Add("/nosplash");
//args.Add("/safemode");
//args.Add("/notemplate");
var hostWnd = Core.KeepUIOnTop ? hostMainWindow.Handle : IntPtr.Zero;
core = new RhinoCore(args.ToArray(), WindowStyle.Hidden, hostWnd);