|
可使用RunMacro2函數執行外部宏,如下參考- Option Explicit6 f, Y6 H t5 u3 w+ K* E
- Dim swApp As SldWorks.SldWorks
9 S, b: ~- M7 a# h6 Q - Dim runMacroError As Long$ {9 ^& V. V; B0 j
) r8 W$ \& @. v" N2 o- Sub main(), b: u! g/ ]* S
- Set swApp = Application.SldWorks
6 k" w+ t2 _4 s( Z - swApp.RunMacro2 "C:\Users\Administrator\Desktop\Macros\刪除所有配置屬性.swp", "配置1", "main", 0, runMacroError) s1 |3 m& l1 i7 _* d# N- _5 h
- swApp.RunMacro2 "C:\Users\Administrator\Desktop\Macros\刪除自定義屬性.swp", "配置1", "main", 0, runMacroError
! F0 H# }; f3 N - swApp.RunMacro2 "C:\Users\Administrator\Desktop\Macros\partitionTM.swp", "partitionTM1", "main", 0, runMacroError
' N0 s- N: n1 u- p: e - End Sub
F% f% X6 V& i7 h) ] _
復制代碼 o" h8 a# M _4 g* J+ F# d+ H) Y
|
本帖子中包含更多資源
您需要 登錄 才可以下載或查看,沒有帳號?注冊會員
x
評分
-
查看全部評分
|