Skip to content

Why is my SOLIDWORKS Macro not Running?

Article by Samony Riyaz created/updated October 7, 2019

Have you ever ran into a situation where your SOLIDWORKS Macro is not running? Or it looks like it runs but nothing happens and it doesn’t give you an error message?

The most common reason for this is that you’ve recently performed an upgrade on your SOLIDWORKS systems and the macro was created in an older version of SOLIDWORKS.

Use Case:

  • User Created the macro in SOLIDWORKS 2016
  • Performed an upgrade to SOLIDWORKS 2019
  • Macro does not run anymore and doesn’t give any errors

Approach:

  • Launch up the Macro in Edit mode. Ensure that you have access to the code (some code may be password protected – Check with the developer of the Macro)
    • Open SOLIDWORKS > Tools > Macro > Edit > Browse to the Macro Location
  • In the VBA Editor Window, Navigate to Tools > References and update the references seen below to the 2019 version.
    • SldWorks 2016 Type Library TO 2019
    • SOLIDWORKS 2016 Constants Type Library TO 2019
    • SOLIDWORKS 2016 Commands Type Library TO 2019

SOLIDWORKS Macro 2016 References

SOLIDWORKS Macro Not Running

SOLIDWORKS Macro 2019 References

Run the Macro and it should run as expected.

Learn more about SOLIDWORKS Macros/API

Javelin provides SOLIDWORKS VB for Applications and SOLIDWORKS API training courses, which you can take live online, or in one of our Canadian classrooms. Check our schedule to learn more.

Posts related to 'Why is my SOLIDWORKS Macro not Running?'

Find Related Content by TAG:

Samony Riyaz

Want to learn SOLIDWORKS?

Take a training course from our team of Certified SOLIDWORKS Experts

Scroll To Top