|
马上注册,结交更多同行朋友,交流,分享,学习。
您需要 登录 才可以下载或查看,没有帐号?注册
x
小弟初学开发,发现个问题发现如下代码运行和实际不符,主要为倒圆角的位置,请赐教
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.SketchManager.InsertSketch True
Part.ClearSelection2 True
Dim skSegment As Object
Set skSegment = Part.SketchManager.CreateCenterLine(0#, 0#, 0#, 0.1, 0#, 0#)
Part.ClearSelection2 True
Set skSegment = Part.SketchManager.CreateLine(0#, 0#, 0#, 0#, 30 / 2000 + 0.005, 0#)
Set skSegment = Part.SketchManager.CreateLine(0#, 30 / 2000 + 0.005, 0#, 0.004, 30 / 2000 + 0.005, 0#)
Set skSegment = Part.SketchManager.CreateLine(0.004, 30 / 2000 + 0.005, 0#, 0.004, 30 / 2000, 0#)
Set skSegment = Part.SketchManager.CreateLine(0.004, 30 / 2000, 0#, 69 / 1000, 30 / 2000, 0#)
Set skSegment = Part.SketchManager.CreateLine(69 / 1000, 30 / 2000, 0#, 69 / 1000, 0#, 0#)
Set skSegment = Part.SketchManager.CreateLine(69 / 1000, 0#, 0#, 0#, 0#, 0#)
Part.ClearSelection2 True
Dim myFeature As Object
Set myFeature = Part.FeatureManager.FeatureRevolve2(True, True, False, False, False, False, 0, 0, 6.2831853071796, 0, False, False, 0.01, 0.01, 0, 0, 0, True, True, True)
boolstatus = Part.Extension.SelectByID2("", "EDGE", 0.004, 0.015, 0, False, 0, Nothing, 0)
Set myFeature = Part.FeatureManager.FeatureFillet2(195, 0.003, 0, 0, 0, 0, 0)
End Sub
|
|