Message 1 of 6
Controlling Number of Features in a Circular Pattern - iLogic

Not applicable
04-10-2015
05:04 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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