private void mouseClick(MouseButtonEnum Button, ShiftStateEnum ShiftKeys, Inventor.Point ModelPosition, Point2d ViewPosition, Inventor.View View)
 {
     if (Button == MouseButtonEnum.kLeftMouseButton && pt1 == null)
     {
         pt    = ModelPosition;
         pt1   = ViewPosition;
         pt1.X = pt.X;
         pt1.Y = pt.Y;
         interEvts.StatusBarText = "Вторая точка выноски:";
         objs.Add(pt1);
         if (selEvts.SelectedEntities.Count != 0)
         {
             dcs = (Inventor.DrawingCurveSegment)selEvts.SelectedEntities[1];
         }
         dc = dcs.Parent;
     }
     else if (Button == MouseButtonEnum.kLeftMouseButton && pt2 == null)
     {
         try
         {
             pt2   = ViewPosition;
             pt2.X = ModelPosition.X; pt2.Y = ModelPosition.Y;
             objs.Add(pt2);
             interEvts.Stop();
             obj = dc.ModelGeometry;
             try
             {
                 compOcc = ((Inventor.FaceProxy)obj).ContainingOccurrence;
             }
             catch (Exception)
             {
                 try
                 {
                     compOcc = ((Inventor.EdgeProxy)obj).ContainingOccurrence;
                 }
                 catch (Exception ex1)
                 {
                     MessageBox.Show(ex1.ToString());
                 }
             }
             gInt = m_DrwDoc.ActiveSheet.CreateGeometryIntent(dc);
             objs.Add(gInt);
             ball = m_DrwDoc.ActiveSheet.Balloons.Add(objs);
             ball.BalloonValueSets.Add(m_AsmDoc.ComponentDefinition.Occurrences[1]);
         }
         catch (Exception ex)
         {
             MessageBox.Show(ex.ToString());
         }
     }
 }
Beispiel #2
0
 public static InvComponentOccurrence ByInvComponentOccurrence(Inventor.ComponentOccurrence invComponentOccurrence)
 {
     return(new InvComponentOccurrence(invComponentOccurrence));
 }
Beispiel #3
0
 private InvComponentOccurrence(Inventor.ComponentOccurrence invComponentOccurrence)
 {
     InternalComponentOccurrence = invComponentOccurrence;
 }