Microsoft Visua Studio - Installation


Which options should I set to the minimum hard drive space installation for C#?

6GB for setting the C# options is lot of space for me.

VS Community 19 or 22 with only the desktop application workload. That’s all you need.

Also, check our SOLIDWORKS SDK:

Links are in the description of the video.

And what should I do for building the DLL to add the macro button into the Solidworks?

Install anything else or just changing a few config options?

Not too sure what you mean. You cannot add macro buttons via a DLL.

After adding a new macro button you will set the macro filename location. The default macro extension is SWP but if you check the options in the combo box you will notice it’s possible to point to a DLL file type.

I already have recoded a macro from VBA to C# and compiled to exe file but how is it possible to run the macro from Solidworks application?


Use RunMacro. Take a look at this example.

Please dot not post more than one question per post.

After following the video the option “Register for COM interop” is disabled for checking to me.

I feel frustrated because I’ve made a new VBA macro just calling the RunMacro command but the exe file does not run.

I’ve installed VSTA 2022. Should I install the SolidWorks API SDK according to the help doc?: SOLIDWORKS API Getting Started Overview - 2020 - SOLIDWORKS API Help

Again please dot not post more than one question per post.

I understand your frustration. We all have been there. It is disabled because your project is a .exe probably