Message 1 of 6
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi All,
I'm looking to split a solid body using a feature pattern element with iLogic/VBA. Below is what I have so far, however I can't seem to get the correct reference from the pattern element for the split command. The pattern elements are workplanes. Does anybody know how I might do this?
SyntaxEditor Code Snippet
Dim oDoc As PartDocument oDoc = ThisDoc.Document Dim oDef As ComponentDefinition oDef = oDoc.ComponentDefinition oPatternName = "Rectangular Pattern9" Dim oPattern As RectangularPatternFeature myFeat = Feature.InventorFeature(oPatternName) PatternPlane = myFeat.PatternElements.Item(1) '''Dim myPlane As WorkPlane '''myPlane = oDef.Workplanes.Item("BaseTrimLH") Dim SpFeature As SplitFeature Dim oPFeatures As PartFeatures oPFeatures = oDef.Features '''Delete existing features For Each SpFeature In oDef.Features.SplitFeatures SpFeature.Delete Next ''Add new split SpFeature = oPFeatures.SplitFeatures.SplitBody(PatternPlane,oDef.SurfaceBodies(1))
Thanks
Solved! Go to Solution.