I am trying to find the edge connected to the imate. I want to use the edge for further connection.
For finding the edge I have written:
For i = 1 To oocc1.iMateDefinitions.Count
If oocc1.iMateDefinitions.item(i).Name = "Insert In2" Then
bFoundDefinition = True
Set oimate = oocc1.iMateDefinitions.item(i)
Set oedge = oimate.Entity
Exit For
End If
Next
' Exit sub if an iMate wasn't found.
If Not bFoundDefinition Then
MsgBox "The occurrence does not contain an iMate named ""Insert In2"""
Exit Function
End If
lateron i connect to the edge with:
Set oiMateResult = oAsmCompDef.iMateResults.AddByiMateAndEntity(oimate, oedge)
probably I am not allowed to use: oimate.entity to find the edge because the connection gives me an error. Does anyone knows a workaround to find and use the edge connected to the imate?