solidworks 二次开发全教程系列solidworks 二次开发-01-录制一个宏 第一步:我们需要自己录制一个宏,然后看看程序产生了什么代码
当初学习 excel 时候就是这么干的
只是,solidworks 要复杂一些,直接录制的宏不能使用,需要做一些调整
在没有经验的时候我们最好根据下面的建议来做
Edit or Debug SolidWorks MacroEdit or debug SolidWorks macros using Microsoft VBA
使用 Microsoft VBA 编辑或调试宏To edit or debug a SolidWorks macro:Click Edit Macro on the Macro toolbar, or click Tools, Macro, Edit
NOTES: 注意:To automatically edit a macro after recording it, click Tools, Options, Systems Options
On the General tab, select Automatically edit macro after recording and click OK
This setting is persistent across SolidWorks sessions
此选项 Automatically edit macro after recording 顾名思义是在记录宏完毕后自动打开编辑界面
If you recently edited the macro, you can select it from the menu when you click Tools, Macro
This menu lists the last nine macros t