AddUsingiMates Crashes the Inventor

AddUsingiMates Crashes the Inventor

Mehmet_Fatih_Turker
Advocate Advocate
117 Views
0 Replies
Message 1 of 1

AddUsingiMates Crashes the Inventor

Mehmet_Fatih_Turker
Advocate
Advocate

Hi all,

 

I have a crash at the line of;

Dim LiftingSheetCompOcc As Inventor.ComponentOccurrence = AG_CW_BOB_MONcompdef.Occurrences.AddUsingiMates(liftingSheetPath, True)

 

I already filled crash report with ID number of 805948009 

 

Simply I want to bring specific part to assembly by using its iMate feature. I guess my problem is with AddUsingiMates method because I've added 10 to 12 parts into assy and constrained them before the line that I mentioned above. as an example how Im adding parts into assembly  ;

                If isZ Or isL Then

                    For i As Integer = 1 To 2
#Region "Adding and Constraining ... Here"

                        Dim topandBottomIsoCompOcc As Inventor.ComponentOccurrence = docN_B_McompDef.Occurrences.Add(isoTopBottomPath, defaultMatrix)
                        Dim topandBottomIsoDoc As Inventor.AssemblyDocument = topandBottomIsoCompOcc.Definition.Document
                        topandBottomIsoCompOcc.Grounded = False

#Region "Plane and Plane Proxies"

                        Dim t_b_isoYZPlane As WorkPlane = topandBottomIsoDoc.ComponentDefinition.WorkPlanes.Item("YZ Plane")
                        Dim t_b_isoYZPlaneProxy As WorkPlaneProxy
                        topandBottomIsoCompOcc.CreateGeometryProxy(t_b_isoYZPlane, t_b_isoYZPlaneProxy)

                        Dim t_b_isoXYPlane As WorkPlane = topandBottomIsoDoc.ComponentDefinition.WorkPlanes.Item("XY Plane")
                        Dim t_b_isoXYPlaneProxy As WorkPlaneProxy
                        topandBottomIsoCompOcc.CreateGeometryProxy(t_b_isoXYPlane, t_b_isoXYPlaneProxy)

                        Dim t_b_isoXZPlane As WorkPlane = topandBottomIsoDoc.ComponentDefinition.WorkPlanes.Item("XZ Plane")
                        Dim t_b_isoXZPlaneProxy As WorkPlaneProxy
                        topandBottomIsoCompOcc.CreateGeometryProxy(t_b_isoXZPlane, t_b_isoXZPlaneProxy)

#End Region
#Region "Constraints"
                        If i = 1 Then

                            Dim t_b_iso1 As MateConstraint = docN_B_McompDef.Constraints.AddMateConstraint(oN_B_MUserPlane11, t_b_isoXYPlaneProxy, 0)
                            Dim t_b_iso2 As FlushConstraint = docN_B_McompDef.Constraints.AddFlushConstraint(t_b_isoYZPlaneProxy, oN_B_MYZPlane, "Kademe_Kaydirma_Toplam_Kalinligi / 2 ul")
                            Dim t_b_iso3 As MateConstraint = docN_B_McompDef.Constraints.AddMateConstraint(oN_B_MXZPlane, t_b_isoXZPlaneProxy, 0)

                        Else

                            Dim t_b_iso4 As FlushConstraint = docN_B_McompDef.Constraints.AddFlushConstraint(t_b_isoYZPlaneProxy, oN_B_MYZPlane, "Kademe_Kaydirma_Toplam_Kalinligi / 2 ul")
                            Dim t_b_iso5 As FlushConstraint = docN_B_McompDef.Constraints.AddFlushConstraint(oN_B_MUserPlane4, t_b_isoXYPlaneProxy, 0)
                            Dim t_b_iso6 As FlushConstraint = docN_B_McompDef.Constraints.AddFlushConstraint(oN_B_MXZPlane, t_b_isoXZPlaneProxy, 0)

                        End If
#End Region
#End Region
                    Next

 

This works so far so good but Crashes at at the AddUsingiMates method. Is there anyone experienced such problem? 


Please dont ask me for whole code because it reached to almost 15k line here. I could have shared as zip but company doesnt  allow me to.

0 Likes
118 Views
0 Replies
Replies (0)