|
发表于 2018-11-30 11:11:50
|
显示全部楼层
可使用RunMacro2函数执行外部宏,如下参考- Option Explicit# D5 X& f; K( q, F
- Dim swApp As SldWorks.SldWorks E* `7 |$ a8 x$ R& H
- Dim runMacroError As Long( d' k0 W& d, m7 N9 T* k! U2 K! x
- / r, S9 c3 u/ y5 v; m2 Q k7 s
- Sub main()
, O4 w5 @; S; V+ G" @, r6 m# t - Set swApp = Application.SldWorks
; r4 s; f2 b! A1 p2 X% u+ k* G - swApp.RunMacro2 "C:\Users\Administrator\Desktop\Macros\删除所有配置属性.swp", "配置1", "main", 0, runMacroError. q0 U1 A8 _' S/ g3 q
- swApp.RunMacro2 "C:\Users\Administrator\Desktop\Macros\删除自定义属性.swp", "配置1", "main", 0, runMacroError
6 X9 {& Y/ i6 S* P8 h - swApp.RunMacro2 "C:\Users\Administrator\Desktop\Macros\partitionTM.swp", "partitionTM1", "main", 0, runMacroError
! a; x& n, D8 U - End Sub
) r5 }6 | y5 s" N
复制代码
8 O+ n [6 K: O4 R |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
评分
-
查看全部评分
|