Holes Ilogic - Quantity - Variation.

Holes Ilogic - Quantity - Variation.

iva.btblan
Advocate Advocate
400 Views
3 Replies
Message 1 of 4

Holes Ilogic - Quantity - Variation.

iva.btblan
Advocate
Advocate

Conducting studies.

The dimensions change until you reach the final result. For this it has many variations.
After the changes in the amount of holes.

It is not updated.
Is it possible to reverse this process?
Update the amount of holes?

Ilogic suppressed everything. ilogic does not reverse the process.

06.05.0006.png06.05.0007.png06.05.0009.png06.05.0010.pngI can't handle this. can someone help me.

0 Likes
Accepted solutions (1)
401 Views
3 Replies
Replies (3)
Message 2 of 4

iva.btblan
Advocate
Advocate

Please,

Can anyone help to solve this problem?

0 Likes
Message 3 of 4

JelteDeJong
Mentor
Mentor
Accepted solution

try this:

Dim doc As PartDocument = ThisDoc.Document
Dim pattern As RectangularPatternFeature = doc.ComponentDefinition.Features.RectangularPatternFeatures.Item(1)

Dim dia As Double = d0 / 10
Dim borderOffset = d17 / 10

Dim hole As HoleFeature = pattern.Definition.ParentFeatures.Item(1)
Dim holeDia As Double = hole.HoleDiameter.Value

Dim radius2 = ((dia - holeDia) / 2 - borderOffset) ^ 2

Dim firstElement = pattern.PatternElements.Item(1)
Dim centerPos As Vector = firstElement.Transform.Translation
Dim X = centerPos.X
Dim Y = centerPos.Y
Dim Z = centerPos.Z

For Each item As FeaturePatternElement In pattern.PatternElements
    If (item Is firstElement) Then Continue For
    item.Suppressed = True
    Try
        Dim ev = item.Transform.Translation
        Dim diffX = (X - ev.X) ^ 2
        Dim diffY = (Y - ev.Y) ^ 2
        Dim diffZ = (Z - ev.Z) ^ 2

        Dim itemRadius = diffX + diffY + diffZ

        If (radius2 > itemRadius) Then
            item.Suppressed = False
        End If
    Catch ex As Exception

    End Try
Next
doc.Update()

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com

0 Likes
Message 4 of 4

iva.btblan
Advocate
Advocate

 ,

Wonderful!

Thank you so much for your help.

 

iva.btblan

0 Likes