4 Replies Latest reply on Apr 7, 2014 10:59 AM by Blandine Ganivet

    Issue with rotation

    Blandine Ganivet

      I would like to create a RefPlane with 3 points but in some case it doesn't work.

      This is my code :

       

                  ModelDoc2 swDoc = ((ModelDoc2)(_iSwApp.ActiveDoc));

                  swDoc.SketchManager.InsertSketch(false);

                  swDoc.SketchManager.Insert3DSketch(true);

                  swDoc.SetDisplayWhenAdded(false);

                  SketchPoint Skpoint1 = swDoc.CreatePoint2(_orthoimageCoordinatesBL.X, _orthoimageCoordinatesBL.Y, _orthoimageCoordinatesBL.Z);

                  SketchPoint Skpoint2 = swDoc.CreatePoint2(_orthoimageCoordinatesTR.X, _orthoimageCoordinatesTR.Y, _orthoimageCoordinatesTR.Z);

                  SketchPoint Skpoint3 = swDoc.CreatePoint2(_orthoimageCoordinatesTL.X, _orthoimageCoordinatesTL.Y, _orthoimageCoordinatesTL.Z);

                  swDoc.SketchManager.Insert3DSketch(true);

                  bool boolstatus = Skpoint1.Select4(true, selectData);

                  boolstatus = Skpoint2.Select4(true, selectData);

                  boolstatus = Skpoint3.Select4(true, selectData);

                  RefPlane swplane = swDoc.CreatePlaneThru3Points3(true);

       

      When my three points are visible in my view it works but if one point is "hidden" it doesn't work.

      Do you have any idea to help me?

      Thank