|
楼主 |
发表于 2013-5-11 08:38:03
|
显示全部楼层
' C:\Users\Administrator\AppData\Local\Temp\swx1888\Macro1.swb - macro recorded on 05/11/13 by Administrator
' ******************************************************************************
Dim swApp As Object
Dim Part As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Sub main()
Set swApp = _
Application.SldWorks
Set Part = swApp.ActiveDoc
boolstatus = Part.Extension.SelectByID2("前视基准面", "PLANE", 0, 0, 0, False, 0, Nothing, 0)
Part.ClearSelection2 True
Dim skSegment As Object
Set skSegment = Part.SketchManager.CreateCircle(0#, 0#, 0#, 0.075276, -0.017318, 0#)
Part.ShowNamedView2 "*上下二等角轴测", 8
Part.ClearSelection2 True
boolstatus = Part.Extension.SelectByID2("Arc1", "SKETCHSEGMENT", 0, 0, 0, False, 0, Nothing, 0)
Dim myFeature As Object
Set myFeature = Part.FeatureManager.FeatureExtrusion2(True, False, False, 0, 0, 0.01, 0.01, False, False, False, False, 1.74532925199433E-02, 1.74532925199433E-02, False, False, False, False, True, True, True, 0, 0, False)
Part.SelectionManager.EnableContourSelection = False
Part.ClearSelection2 True
Part.ClearSelection2 True
Set skSegment = Part.SketchManager.CreateCircle(0#, 0#, 0#, 0.053176, -0.026538, 0#)
Part.ClearSelection2 True
boolstatus = Part.Extension.SelectByID2("Arc1", "SKETCHSEGMENT", 0, 0, 0, False, 0, Nothing, 0)
Set myFeature = Part.FeatureManager.FeatureExtrusion2(True, False, False, 0, 0, 0.02, 0.01, False, False, False, False, 1.74532925199433E-02, 1.74532925199433E-02, False, False, False, False, True, True, True, 0, 0, False)
Part.SelectionManager.EnableContourSelection = False
Part.ClearSelection2 True
Part.ClearSelection2 True
Set skSegment = Part.SketchManager.CreateCircle(0#, 0#, 0#, 0.02502, -0.009058, 0#)
Part.ClearSelection2 True
boolstatus = Part.Extension.SelectByID2("Arc1", "SKETCHSEGMENT", 0, 0, 0, False, 0, Nothing, 0)
Set myFeature = Part.FeatureManager.FeatureExtrusion2(True, False, False, 0, 0, 0.03, 0.02, False, False, False, False, 1.74532925199433E-02, 1.74532925199433E-02, False, False, False, False, True, True, True, 0, 0, False)
Part.SelectionManager.EnableContourSelection = False
End Sub
|
|