Save CPlane and Revert

How do I save off the current CPlane and then revert back to it after my script runs?

Are you using Python or RhinoScript (e.g. VBScript)?

– Dale


@dale - Figured it out. Code is below in case someone needs it. Code simply changes the CPlane in the current viewport to the WorldXYPlane. User selects a point. Code changes the plane back to the previous one. If you set a variable equal to the statement used to change the CPlane then the old CPlane is saved off. Code is provided to simply demonstrate how to save off the current CPlane.

Would it be nice to have an additional method for saving off the CPlane without having to change it? If you implemented a new method like this then it would make the code a little more readable.

    OldCPlane = rs.ViewCPlane(None, rs.WorldXYPlane())
    rs.ViewCPlane(None, OldCPlane)