程序代码

更新时间:2023-05-16 04:11:54 阅读: 评论:0

正确代码
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.NewDocument("C:\ProgramData\SolidWorks\SolidWorks 2010\templates\零件.prtdot", 0, 0, 0)
swApp.ActivateDoc2 "零件8", Fal, longstatus
whitenoi
Set Part = swApp.ActiveDoc
Dim myModelView As Object
Set myModelView = Part.ActiveView
sustain
myModelView.FrameState = swWindowState_e.swWindowMaximized
boolstatus = Part.Extension.SelectByID2("前视基准面", "PLANE", 0, 0, 0, Fal, 0, Nothing, 0)
Part.SketchManager.InrtSketch True
Part.ClearSelection2 True
Dim vSkLines As Variant
vSkLines = Part.SketchManager.CreatePolygon(0, 0, 0, 0.04462894324853, 0, 0, 6, True)
Part.ClearSelection2 True
boolstatus = Part.Extension.SelectByID2("Point2", "SKETCHPOINT", 0.02231447162427, 0.03864979859728, 0, Fal, 0, Nothing, 0)
boolstatus = Part.Extension.SelectByID2("Point6", "SKETCHPOINT", 0.02231447162427, -0.03864979859728, 0, True, 0, Nothing, 0)
Dim myDisplayDim As Object
Set myDisplayDim = Part.AddDimension2(0.09157979941292, -0.001109075342466, 0)
Part.ClearSelection2 True
Part.ClearSelection2 True
Part.SketchManager.InrtSketch True
休斯顿火箭英文Part.ShowNamedView2 "*上下二等角轴测", 8
Part.ClearSelection2 True
boolstatus = Part.Extension.SelectByID2("草图1", "SKETCH", 0, 0, 0, Fal, 0, Nothing, 0)
Dim myFeature As Object
Set myFeature = Part.FeatureManager.FeatureExtrusion2(True, Fal, Fal, 0, 0, 0.01, 0.01, Fal, Fal, Fal, Fal, 0.01745329251994, 0.01745329251994, Fal, Fal, Fal, Fal, True, True, True, 0, 0, Fal)
Part.SelectionManager.EnableContourSelection = Fal
boolstatus = Part.Extension.SelectByID2("", "FACE", -0.00426527231059, 0.002431188160756, 0.009999999999934, Fal, 0, Nothing, 0)
Part.SketchManager.InrtSketch True
Part.ClearSelection2 True
Dim skSegment As Object拼搏的英文
Set skSegment = Part.SketchManager.CreateCircle(0#, 0#, 0#, 0.014345, 0.004386, 0#)
Part.ClearSelection2 True
Part.SketchManager.InrtSketch True
Part.ClearSelection2 True
boolstatus = Part.Extension.SelectByID2("草图2", "SKETCH", 0, 0, 0, Fal, 0, Nothing, 0)
Set myFeature = Part.FeatureManager.FeatureCut(True, Fal, Fal, 1, 0, 0.01, 0.01, Fal, Fal, Fal, Fal, 0.01745329251994, 0.01745329251994, Fal, Fal, Fal, Fal, Fal, True, True)
Part.SelectionManager.EnableContourSelection = Fal
End Sub
Private Sub Command1_Click()
Dim swApp As Object
Dim Part As Objectpersonal information
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Dim d As Double
Dim h As Double
d = Val(Text2.Text) / 1000
h = Val(Text1.Text) / 1000
Set swApp = CreateObject("SldWorks.Application")
'Set swApp = Application.SldWorks
Set Part = swApp.NewPart
Set Part = swApp.ActiveDoc
Dim myModelView As Object
Set myModelView = Part.ActiveView
myModelView.FrameState = swWindowState_e.swWindowMaximized
boolstatus = Part.Extension.SelectByID2("前视", "PLANE", 0, 0, 0, Fal, 0, Nothing, 0)
Part.SketchManager.InrtSketch True
Part.ClearSelection2 True
Dim skSegment As Object
Set skSegment = Part.SketchManager.CreateCircle(0#, 0#, 0#, 0#, d / 2, 0#)
Part.ShowNamedView2 "*上下二等角轴测", 8
layercakePart.ClearSelection2 True
boolstatus = Part.Extension.SelectByID2("Arc1", "SKETCHSEGMENT", 0, 0, 0, Fal, 0, Nothing, 0)
Dim myFeature As Object
Set myFeature = Part.FeatureManager.FeatureExtrusion2(True, Fal, Fal, 0, 0, h, 0.01, Fal, Fal, Fal, Fal, 0.01745329251994, 0.01745329251994, Fal, Fal, Fal, Fal, True, True, True, 0, 0, Fal)
Part.SelectionManager.EnableContourSelection = Fal
End Sub
Private Sub Command1_Click()
Dim swApp As Object
Dim Part As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Dim d As Double
Dim h As Double
d = Val(Text2.Text) / 1000
h = Val(Text1.Text) / 1000
Set swApp = CreateObject("SldWorks.Application")
'Set swApp = Application.SldWorks
Set Part = swApp.NewDocument("C:\Documents and Settings\All Urs\Application Data\SolidWorks\SolidWorks 2010\templates\零件.prtdot", 0, 0, 0)
cidianswApp.ActivateDoc2 "零件1", Fal, longstatus
Set Part = swApp.ActiveDoc
英文字母大小写Dim myModelView As Object
Set myModelView = Part.ActiveView
myModelView.FrameState = swWindowState_e.swWindowMaximized
Set Part = swApp.ActiveDoc
Set myModelView = Part.ActiveView
myModelView.FrameLeft = 0
myModelView.FrameTop = 21
Set myModelView = Part.ActiveView

本文发布于:2023-05-16 04:11:54,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/78/649413.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:需要   基准面   条件
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图