This code selects a feature and an edge for direction, theninserts a pattern. I want to get rid SelectByID2, I want whateverfeature and direction selected by the USER to be used as the inputto the pattern feature.
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
boolstatus = Part.Extension.SelectByID2("Extrude2", "BODYFEATURE",-.1, 0, 7, False, 4, Nothing, 0)
boolstatus = Part.Extension.SelectByID2("", "EDGE", -0.1, 1, 0,True, 1, Nothing, 0)
Set Feature = Part.FeatureManager.FeatureLinearPattern2(5, 0.0254,1, 0.05, True, False, "NULL", "NULL", False)
SolidworksApi macros
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
boolstatus = Part.Extension.SelectByID2("Extrude2", "BODYFEATURE",-.1, 0, 7, False, 4, Nothing, 0)
boolstatus = Part.Extension.SelectByID2("", "EDGE", -0.1, 1, 0,True, 1, Nothing, 0)
Set Feature = Part.FeatureManager.FeatureLinearPattern2(5, 0.0254,1, 0.05, True, False, "NULL", "NULL", False)
SolidworksApi macros
