Dim swApp As Object
Dim Part As Object
Private Sub Command1_Click()
Set swApp = CreateObject("SldWorks.Application")
swApp.Visible (True)
Set Part = swApp.OpenDoc("D:\挡圈.SLDPRT", swDocPART)
Set Part = swApp.ActivateDoc("档圈. sldprt")
Part.Parameter("D1@草图1").System Value = Val(wj.Text)
Part.Parameter("D2@草图1").SystemValue = Val(Text3.Text)
Part.Parameter("凸台拉伸@草图1").SystemValue = Val(Text2.Text)
Part.EditRebuild
Part.Save
End Sub