Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
dg2405
in reply to: MattH_Work

I do not know how your workflow is, i normally search for identic edges like this:

 

Sub Select_Same_Edges()
Dim oApp As Inventor.Application
Set oApp = ThisApplication
Dim oAsmDoc As AssemblyDocument
Set oAsmDoc = oApp.ActiveDocument
Dim oAsmCompDef As AssemblyComponentDefinition
Set oAsmCompDef = oAsmDoc.ComponentDefinition
Dim oSelectedEdge As EdgeProxy
Set oSelectedEdge = ThisApplication.CommandManager.Pick(kPartEdgeCircularFilter, "Celect circular edge")
'Occurrence ermitteln
Dim oSelectedOcc As Inventor.ComponentOccurrence
Set oSelectedOcc = oSelectedEdge.Parent.Parent

'Loop through all occs of the assembly, if want all oOccs (inc. child-occs) you have to write a recursive function
Dim oOcc As ComponentOccurrence
For Each oOcc In oAsmCompDef.Occurrences
    Dim oEdge As Edge
    If TypeOf oOcc.Definition.Document Is PartDocument Then
        For Each oEdge In oOcc.Definition.SurfaceBodies.Item(1).Edges
            If oEdge Is oSelectedEdge.NativeObject Then
                 Dim oEdgeProxy As EdgeProxy
                 Call oOcc.CreateGeometryProxy(oEdge, oEdgeProxy)
                 Call oAsmDoc.SelectSet.Select(oEdgeProxy)
            End If
        Next
    End If
Next
End Sub