Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
Anonymous
1074 Views, 5 Replies

Controlling Number of Features in a Circular Pattern - iLogic

How do you control the number of features in a circular pattern(of a single part) with iLogic?  I can count them but don't know how to change them.  I can change the parameter directly but is there something like oCircularPatternFeature.NumberOfElements?

 

SyntaxEditor Code Snippet

Dim oDoc As PartDocument
Dim oCompDef As PartComponentDefinition
Dim oCircularPatternFeature As CircularPatternFeature
Dim oCircularPatternFeatures As CircularPatternFeatures
Dim dNumberOfBolts As Parameter


'Set the document
oDoc = ThisDoc.Document

'Set the component definition
oCompDef = oDoc.ComponentDefinition

'Set the circular pattern features collection
oCircularPatternFeatures = oCompDef.Features.CircularPatternFeatures

'Show the number of bolts
For Each oCircularPatternFeature In oCircularPatternFeatures

    If oCircularPatternFeature.Name = "BoltPattern" Then
    
        dNumberOfBolts = oCircularPatternFeature.Count
    
        MessageBox.Show("There are now " & dNumberOfBolts.Value & " bolts.", "Test")
        
    
    Else
    End If

Next