下面是我抄的部分代码,可是怎么也新建不了新的文件,单击按钮就不管用,什么反应也没有,加上断点感觉程序也是执行了这几句,但软件就是没反应
?, [8 b( M. {! n+ R* B5 P& X7 }! f( R* |0 c! X5 s- T- W
7 A2 N# p. x; H Dim swapp As SldWorks.SldWorks
8 [0 f" q Z9 A$ m% U Set swapp = Application.SldWorks
' T( k* ^ X. M; {/ O* [- W% |9 J Dim swmodel As SldWorks.ModelDoc2
7 T" h" T; e/ I! k( [8 _/ V0 ` 'Determine which option is selected
3 z7 n/ f4 G$ [7 \$ I7 W 'and connect to the modeldoc2 object- S! d& R0 M8 a; L A H Y
If optPart.Value = True Then x0 T1 p+ w! F. L; z+ Y/ L
Set swmodel = swapp.NewDocument(filedir + "APIPart.prtdot", 0, 0#, 0#); b5 f8 i/ h3 [$ d/ g
End If
# J9 v- P4 f; I% n( L, \; ? If optAssy.Value = True Then
" }. U6 g2 X2 F) S# g, _/ L Set swmodel = swapp.NewDocument(filedir + "APIassembly.asmdot", 0, 0#, 0#)
( `2 s4 x3 m. ~7 R End If
) o5 k4 J5 L, M, G If optDraw.Value = True Then$ }% w8 U( [ e3 H& a" y
Set swmodel = swapp.NewDocument(filedir + "APIdrawing.drwdot", 0, 0#, 0#)
5 {& x/ n& _" l4 \1 a, X' i End If |