0 Replies Latest reply on May 25, 2016 7:29 PM by Yc Lim

    Hiding / Removing a Plane Manipulator C#

    Yc Lim

      Hello

       

      I can't seem to hide a Plane Manipulator that i"ve created. Creation of the manipulator works fine and i do it like this. 

                 mManipulator = (Manipulator)swModelViewMgr.CreateManipulator((int)swManipulatorType_e.swPlaneManipulator, mPlaneHandler);

                 mPlaneManipulator = (PlaneManipulator)mManipulator.GetSpecificManipulator();

       

           ... various settings in between.. 

                  // Show the plane with the manipulator

                  mManipulator.Show(pDoc);

       

       

      === To hide the manipulator i should just need to call this.

       

                  mManipulator.Remove();

       

      ===However, it does nothing, the only way i can get the manipulator to go away is the do the following.

       

                  // !hack! apparently the only way to force the manipulator to disappear.

                  mPlaneHandler = null;

                  mManipulator = null;

                  mPlaneManipulator = null;

                  GC.Collect();

       

      It seems very wrong that GC.Collect is required to be called in order to get the manipulator to go away immediately, when Remove is all that should be required. Am I missing something here?

       

      YC