Recalculate solution without redrawing canvas

Hello Together

I’m a bit lost with the whole expiring and recompute/redraw of grasshopper. I have the following situation roughly like this.

 for (var i = 0; i < Population; i++)
        {

            Go through all sliders and set tick value (foreach loop)
            {
            //This should set the new slider values and at the end 
            //of this loop it should recalculate the solution without redrawing ever the canvas
                sliders.SetTickValue(value)
            }

            //Here it should redraw the canvas once.
            Doc.NewSolution(false);
            // Doc.ExpirePreview(false);
            // Doc.ExpireSolution(false);
        }

The goal of all this is to improve the time it takes to calculate all of the options. Would anyone have some pointers on that.

Best and thank you already
Felix

This topic should help:

And while it’s meant for GHPython users, this might help too:

Also these methods are available. I’ve never used them, but they might be relevant:

Hey Anders

Thank you for sharing all these topics! Turns out i didt do my homework properly, i just had a deeper look into the grasshopper api and turns out this was excactly what i was searching for…

Doc.NewSolution(false,GH_SolutionMode.Silent);

1 Like