Message 1 of 7

Not applicable
02-06-2020
04:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
In the code below, I tried to make a hole through a feature and a derived component. The hole only ever goes through a solid.
Is there someone who has a snippet of code for me with which you can make a hole through several solid bodies?
Sub X() Dim oCD As PartComponentDefinition Set oCD = ThisApplication.ActiveDocument.ComponentDefinition Dim oSketch As PlanarSketch oSketch = oCD.Sketches.Item(2) Dim oProfile As Profile Set oProfile = oSketch.Profiles.AddForSolid Dim oED As ExtrudeDefinition Set oED = oCD.Features.ExtrudeFeatures.CreateExtrudeDefinition(oProfile, kCutOperation) Call oED.SetDistanceExtent("1000 mm", kNegativeExtentDirection) Dim oExtrude As ExtrudeFeature Set oExtrude = oCD.Features.ExtrudeFeatures.Add(oED) End Sub
Solved! Go to Solution.