How to switch off the "preview" in custom C# component?

unhandled

(Andrealu2012) #1

%E5%9B%BE%E7%89%87
the default is “On”,but it is a little slow in viewport,so need to be “off” ,how to make it off in Custom C# component?
Thankyou


(Michael Pryor) #2

You can hide the actual output like grasshopper does for the points with the grid components when you register the outputs like this:

     protected override void RegisterOutputParams(GH_Component.GH_OutputParamManager pManager)
            {
                pManager.AddBrepParameter("Brep", "B", "Output Brep", GH_ParamAccess.item);
                pManager.HideParameter(0);
            }

So with .HideParameter and the number in the parenthesis is the index number of the output