Macro
Macro
(OP)
I'm looking for some help in creating a macro that will start a sketch on a preselected face and offset a preselected loop and extrude the new sketch x number of units. I've created a macro but macro becomes attached to that specific face on that specific part. A little guidance should be adequate. Thanks.






RE: Macro
Ken
RE: Macro
RE: Macro
Dim swApp As Object
Dim Part As Object
Dim SelMgr As Object
Dim boolstatus As Boolean
Dim Feature As Object
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
Set SelMgr = Part.SelectionManager
Part.SketchManager.InsertSketch True
boolstatus = Part.SketchOffsetEntities2(0.00127, False, True)
Part.ClearSelection2 True
Part.ClearSelection2 True
Part.FeatureManager.FeatureExtrusion True, False, True, 0, 0, 0.00127, 0.00254, False, False, False, False, 0.01745329251994, 0.01745329251994, False, False, False, False, 1, 1, 1
Part.SelectionManager.EnableContourSelection = 0
End Sub