下面是我抄的部分代碼,,可是怎么也新建不了新的文件,,單擊按鈕就不管用,什么反應也沒有,,加上斷點感覺程序也是執(zhí)行了這幾句,,但軟件就是沒反應
( s# S Z3 R3 r H1 K$ D5 ~9 k# ]
9 Z8 N+ }# d. b% R0 o" F
- y2 i: r" s! [- t Dim swapp As SldWorks.SldWorks5 |5 S D- u( d. ~
Set swapp = Application.SldWorks+ I8 P2 m) ^6 b3 ~+ @3 U( n9 X' P
Dim swmodel As SldWorks.ModelDoc23 m5 [0 M1 J( S* y7 ^
'Determine which option is selected5 \) f7 v$ Y2 u! o, K2 J$ Z! I5 @
'and connect to the modeldoc2 object4 B/ _* q2 v+ U$ \
If optPart.Value = True Then
' r4 U' f+ T4 s6 W8 a Set swmodel = swapp.NewDocument(filedir + "APIPart.prtdot", 0, 0#, 0#)
( L6 L" y$ o; ?- u7 l2 @ End If; n) d# ]2 h1 n' r
If optAssy.Value = True Then: A- i2 v0 E/ h2 b1 a% m
Set swmodel = swapp.NewDocument(filedir + "APIassembly.asmdot", 0, 0#, 0#)0 a. T4 `4 L$ u( g
End If+ X: j U+ X: s4 Z
If optDraw.Value = True Then
$ [. g n5 n* f/ z$ _6 Q2 u+ g Set swmodel = swapp.NewDocument(filedir + "APIdrawing.drwdot", 0, 0#, 0#)8 y6 o" ^" W7 _
End If |