0 Replies Latest reply on Mar 12, 2015 6:42 AM by Joecel Torres

    Insertion of line on broken drawing view

    Joecel Torres

      Hi,

       

      Can anyone please enlighten me on this.

      I`m trying to create a section view from a broken drawing view,

      but the line is inserted on the wrong position.

      I attached an image for the summary of the process.

      If my explanation is not clear, please let me know.

       

      Here`s my code snippet.

      double[] viewROutline = ViewR.GetOutline();
      SketchSegment sViewALine;
      isSuccess = swDrawing.ActivateView(ViewR.Name);
      sViewALine = swDocDraw.SketchManager.CreateLine(-(((viewROutline[2] - viewROutline[0]) / 2) * scale[1]), 0, 0, (((viewROutline[2] - viewROutline[0]) / 2) * scale[1]), 0, 0);
      // dummy SW line for testing
      sViewALine = swDocDraw.SketchManager.CreateLine(-(((viewROutline[2] - viewROutline[0]) / 2) * scale[1]),
                                                                          viewROutline[3] * scale[1], 0, (((viewROutline[2] - viewROutline[0]) / 2) * scale[1]), viewROutline[3] * scale[1], 0);
      

      Thanks in advance.

       

      Joecel