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

For everyone's info, 

 

I've got this workaround:

 

        Dim oADoc As AssemblyDocument = InvApp.ActiveEditDocument
        Dim oADef As AssemblyComponentDefinition = oADoc.ComponentDefinition
        Dim InvPart1 As ComponentOccurrence = oADef.Occurrences.Item(1)
        Dim Invpart1Def As PartComponentDefinition = InvPart1.Definition
        Dim InvPart2 As ComponentOccurrence = oADef.Occurrences.Item(2)

        Dim oObjects As ObjectCollection
        Dim oOccPatterns As OccurrencePatterns = oADef.OccurrencePatterns
        Dim oFeature As CircularPatternFeature
        Dim oFeatureProxy As CircularPatternFeatureProxy

        oObjects = InvApp.TransientObjects.CreateObjectCollection
        oObjects.Add(InvPart2)


        oFeature = Invpart1Def.Features.CircularPatternFeatures.Item(1)
        Call InvPart1.CreateGeometryProxy(oFeature, oFeatureProxy)
        Call oADef.OccurrencePatterns.AddFeatureBasedPattern(oObjects, oFeatureProxy)

    End Sub

 

This works with the assembly I posted, as long as the first item has a circular pattern to use.