A SolidWorks macro is not an alternative to the API — it runs on it. Where the real line sits, what a macro handles well, and 8 signs you need an add-in.
What the SolidWorks API is and how it works: the SldWorks, ModelDoc2 and PartDoc hierarchy, the selection-based code trap, and a 5-step learning path.
SolidWorks add-in development in C#: the ISwAddin lifecycle, COM registration, CommandManager and TaskPane, event traps, and 8 mistakes that surface later.
SolidWorks Python scripting with pywin32: connect to the API over COM, drive dimensions, rebuild once, export PDF or DXF — and dodge the COM traps.