马上注册登录,享用更多网站功能!
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
分分分分分分
Private Sub Text1_keyPress(keyp As Integer)
Dim a As String
Dim swApp As Object
Dim Part As Object
Dim boolstatus As Boolean
Dim longstatus As Long
Dim Annotation As Object
Dim Gtol As Object
Dim DatumTag As Object
Dim FeatureData As Object
Dim Feature As Object
Dim Component As Object
If keyp = 13 Then
a = Text1.Text
End If
Set swApp = CreateObject("SldWorks.Application")
Set Part = swApp.Newpart()
Set Part = swApp.ActiveDoc
boolstatus = Part.Extension.SelectByID("前视", "LANE", 0, 0, 0, False, 0, Nothing)
Part.InsertSketch2 True
Part.ClearSelection
Part.InsertSketchText 0, 0, 0, "恭喜您" & Chr(13) & Chr(10) & a, 0, 0, 0, 100, 100
Part.ClearSelection
boolstatus = Part.Extension.SelectByID("SketchText1", "SKETCHTEXT", 0, 0, 0, False, 0, Nothing)
Part.FeatureManager.FeatureExtrusion True, False, False, 0, 0, 0.0005, 0.0005, False, False, False, False, 0.01745329251994, 0.01745329251994, False, False, False, False, 1, 1, 1
Part.SelectedFeatureProperties 255, 1, 0.79, 0.88, 0.21, 0, 0.21, 0, 0, "拉伸1"
Part.SelectionManager.EnableContourSelection = 0
Part.ClearSelection
boolstatus = Part.Extension.SelectByID("点1@原点", "EXTSKETCHPOINT", 0, 0, 0, False, 0, Nothing)
Part.BlankSketch
Part.ShowNamedView2 "*等轴测", 7
Part.ViewZoomtofit2
End Sub |