On Error Resume Next
'关闭上次运行的文件
蜗杆cad.Document.Add '新建一文件
Dim wd As Double
Dim wg As Double
Dim wf As Double
Dim wm As Double
Dim wk As Double '先对各参数类型定义
wm = 8 '模数
wf = 80 '蜗杆分度圆直径
wk = 100'蜗杆宽度
Dim newdirection(0 To 2) As Double '设置三维视点
newdirection(0) = 1: newdirection(1) = 0: newdirection(2) = 1