.
'VBA
'1. Open a sheet metal part that has two cut extrudes.
'2. Modify the macro below as needed.
Dim swApp As SldWorks.SldWorks
Dim Part As SldWorks.ModelDoc2
Dim myFeature As SldWorks.Feature
Dim myNormalCutFeatData As SldWorks.SMNormalCutFeatureData
Dim boolstatus As Boolean
Option Explicit
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
'Select a cut-extrude face for which to create a Normal Cut
boolstatus = Part.Extension.SelectByRay(-6.38655841527864E-02, -1.56055561574817E-02, 3.58410081097382E-03, -9.80322952634684E-02, -0.994744620924993, -2.95433279467378E-02, 2.7317052985792E-04, 2, False, 1, 0)
Dim OneFaceGroup As Long
OneFaceGroup = Part.FeatureManager.AddSMNormalCut()
Part.ClearSelection2 True
'Use an offset plane to create the Normal Cut feature
boolstatus = Part.Extension.SelectByRay(-6.00249578326526E-02, -1.83129588701831E-02, 1.70249820822459E-02, -9.80322952634684E-02, -0.994744620924993, -2.95433279467378E-02, 2.69645748827495E-04, 2, False, 4, 0)
Part.FeatureManager.AddSMNormalCutType True, True, False
'Create a Normal Cut feature using the previously selected cut-extrude faces
Set myFeature = Part.FeatureManager.FinishSMNormalCut()
Set swFeatData = myFeature.GetDefinition
Dim Number As Long
Number = swFeatData.GetNumberOfFaceGroups()
'Select another cut-extrude face for which to create a second Normal Cut
boolstatus = swFeatData.AccessSelections(Part, Nothing)
boolstatus = Part.Extension.SelectByRay(-6.24756020285346E-02, -1.97848124440725E-02, 1.18685503457829E-02, -9.80322952634684E-02, -0.994744620924993, -2.95433279467378E-02, 2.7317052985792E-04, 2, False, 1, 0)
Dim instance As ISelectionMgr
Set face = Part.SelectionManager.GetSelectedObject6(1, -1)
Dim faces As Variant
Dim aFaces() As SldWorks.face
ReDim aFaces(0)
Set aFaces(0) = face
faces = aFaces
longwarnings = swFeatData.AddAGroupOfFaces(faces, longwarnings)
Number = swFeatData.GetNumberOfFaceGroups()
'Change the profile of the Normal Cut by adjusting the offset of the offset plane
myNormalCutFeatData.Offset = 1.0
Dim bStatus As Boolean
bStatus = myFeature.ModifyDefinition(swFeatData, Part, Nothing)
Part.ClearSelection2 True
End Sub