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

Hi aneely_,

 

You will need to iterate through each patterned feature.  I have not tested this code but see if it gets you what you need.  Note that it now references mirror.ParentFeatures.Item(i).

 

For Each mirror As MirrorFeature In part.Definition.Features.MirrorFeatures

                If Not mirror.Suppressed Then

                                For i = 1 to mirror.ParentFeatures.count

                                                If (TypeOf mirror.ParentFeatures.Item(i) Is HoleFeature) Then

                                                                Dim hole as HoleFeature = mirror.ParentFeatures.Item(i)

                                                                For j = 1 to mirror.PatternElements.count

                                                                                dim element as FeaturePatternElement

                                                                                element = mirror.PatternElements.item(j)

                                                                                If Not element.Suppressed Then

                                                                                                ' Get hole position

                                                                                                ' Get hole size

                                                                                End If

                                                                next j

                                                next i

                                End If

                End If

Next mirror

 

Hope that helps!

T.0.M.



Tom Sturtevant
Inventor Part Modeling Developer
Autodesk, Inc.