Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Creating Rhino Viewport in AutoCAD pligin only works if the application is Hidden - undesirable #292

Open
ThomasMahon opened this issue Sep 23, 2023 · 1 comment

Comments

@ThomasMahon
Copy link

ThomasMahon commented Sep 23, 2023

@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:

  1. Slower start-up times.
  2. 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?

@ThomasMahon
Copy link
Author

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);

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant