Disable/enable clipping plane

I am struggling a bit to figure out how to disable or enable a clipping plane object through rhinocommon. What’s the right way to do this? Can I control which viewports it affects? I’ve looked through the ClippingPlaneSurface and the ClippingPlaneObject classes but to no avail.

There is no on/off feature for clipping planes. To hide a clipping plane in a view, you must remove the view (id) from the clipping plane. Does this help?

@dale - I can SEE the viewport ids with ClippingPlaneSurface.ViewportIds() - but I see no way to add or remove any. What am I missing?

I am also looking to enable/disable clipping planes via rhinocommon. Was the problem of how to modify the Viewport id list for a clipping plane ever solved?

Alternatively, is there any way to modify a named view to enable a clipping plane for that view?

Have you tried my GustoJunk plug-in?

You will have to get the clipping plane, make a copy of it, remove the viewports from the copy, and then replace the original object with the new one.