Settings for not showing Grasshopper popups

We are running Rhino/Grasshopper on EC2 instances and want to prevent popups from showing up as much as possible. Please see the screenshot shown below. The popup window has an option Do not show this message again. Where does Grasshopper store whether this checkbox got clicked? We would like to deploy this setting to all our EC2 instances running Rhino/Grasshopper, hence my question.

@stevebaer would you have a hint regarding this?

Or run Rhino in the headless mode as steve says…

Afaik there’s no global switch since GH stores the ignore setting by Guid (neither is the ignore setting saved onto disk).

I use Harmony to hook the breakpoint window and just never show it…

Just hook this method Grasshopper.Tracing.Assert(Guid assert_id, string message, Exception exception), collect necessary info and return. The approach also provides slightly more info than the original GH window, to help with your engineers diagnosing problems.

using System;
using System.Linq;
using HarmonyLib;
using PancakeDev.UI;

namespace PancakeDev.Replacement
{
    [HarmonyPatch(typeof(Grasshopper.Tracing))]
    [HarmonyPatch("Assert")]
    [HarmonyPatch(new[] { typeof(Guid), typeof(string), typeof(Exception) })]
    static class TracingAssert
    {
        static bool Prefix(Guid assert_id, string message, Exception exception)
        {
            var st = (new System.Diagnostics.StackTrace()).GetFrames();
            var st2 = st?.Skip(2);

            // Change to whatever code you need to handle the exception.
            Presenter.ShowAssertForm(message, assert_id, st2, exception);
            return false;
        }
    }
}
using HarmonyLib;

namespace PancakeDev.Replacement
{
    internal static class Hub
    {
        internal static Harmony Instance;

        static Hub()
        {
            // Enable the hook
            Instance = new Harmony("com.gankeyu.pancake.pancakedev");
            Instance.PatchAll(Assembly.GetCallingAssembly());
        }
    }
}

Is this happening with headless Rhino?

1 Like

@stevebaer no, in this case Rhino is not running headless.

@gankeyu many thanks for your suggestion!