04-22-2015
05:11 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
04-22-2015
05:11 AM
Here is the sample to proof the concept.
It adds the second extrude feature (disk) to the existing circular pattern feature.
Open the attached part file and run the iLogic rule.
'this rule adds one more feature
'to the existing circular pattern Feature
Dim oDoc As PartDocument = ThisDoc.Document
Dim oDef As PartComponentDefinition = oDoc.ComponentDefinition
'Feature to be added to the existing pattern
'Should be above the pattern node in the browser!
Dim oPartFeature As PartFeature = oDoc.ComponentDefinition _
.Features.ExtrudeFeatures.Item("Disk")
'reference to the circular pattern feature
Dim oCPF As CircularPatternFeature = oDef.Features.CircularPatternFeatures.Item(1)
'get the feature collection
Dim objCol As ObjectCollection = oCPF.ParentFeatures
'modify the object collection - add one more extrude feature
Call objCol.Add(oPartFeature)
'apply changes to the pattern
oCPF.ParentFeatures = objCol
oDoc.Update
Beep
Initial state:
Result:
cheers,
Vladimir Ananyev
Developer Technical Services
Autodesk Developer Network