I want to add Named Construction Construction Planes (CPlane) to the active Rhino document from a Grasshopper component which I am writing in Python. I know how to get a reference to the ActiveView, and to the construction plane and to change it. However, I cannot see how to add the CPlane to the document with a name. I have found the
NamedConstructionPlaneTable class, but I can’t see how to access (reference) the one for the document. Presumably once I get it, I will “add” the new CPlane to it.
import scriptcontext as sc
view = sc.doc.Views.ActiveView
cp = view.ActiveViewport.GetConstructionPlane()
pln = rs.PlaneFromNormal([0,0,19],[0,0,1])
cp.Plane = pln