Are you interested in learning more on the programming in SOLIDWORKS? Are you interested in giving more power to your macros? If the answer is yes then check this article (link below) by Amen Jlili
Amen describes the process in a very simple words along with pictures of step by step information from start to end.
Still no convinced then you might want to ask yourself by now: Why would I bother about moving my VBA code to VB.NET add-in?
Here’s a list of drawbacks of using VBA macros and benefits of using add-ins:
- Exploitation of a powerful .NET Framework: use of the .NET built-in class libraries
- Better error handling through try catch loops
- Multi-threading: The ability to accomplish multiple tasks asynchronously. This is where VBA fails big time. As VBA runs on a single process, you face problems with time-consuming processes that will potentially freeze your GUI (Graphical User Interface).
- VBA provides an outdated way of error handling
- No uses of delegates (event handlers)
- If VBA crashes, you would not able to debug the error. It will potentially crash SOLIDWORKS with it.
To help you verify the steps, he has added the project files at the end of the article. Check the complete article here and share your views on how your journey from VBA macro to an Add-in was. Taking your SOLIDWORKS VBA macro to the Add-in Realm
And if you’re hungry for more, then check his another awesome add-in for updating Sheet Metal Files on the fly.
Some of functions are change K factor, thickness, radius, etc.
Get this awesome tool here with the source codes. Power-SM Add-in for SOLIDWORKS