This website uses cookies to ensure you get the best experience on our website. By using our website you agree on the following Cookie Policy, Privacy Policy, and Terms Of Use
Legacy SOLIDWORKS macro downloaded from the internet or have been developed in-house some time ago failed to run.
Can't find project or library error is displayed and of the SOLIDWORKS declarations are highlighted.
Macro is pointing to older versions of SOLIDWORKS type libraries and cannot resolve them automatically. As the result the libraries are marked as MISSING.
SOLIDWORKS type libraries were never selected or were explicitly deselected in the macro (this usually happens when macro is converted from *.swp macro)
Resolution
Open the macro for editing via Tools->Macro->Edit menu
Navigate to Tools->References menu in the VBA editor
Select the SOLIDWORKS type libraries as shown below. If libraries cannot be found in the Available References list use Browse... button and find the sldworks.tlb, swconst.tlb, swcommands.tlb in the installation folder of SOLIDWORKS.
Uncheck all of the libraries which are referencing SOLIDWORKS. (including libraries with MISSING keyword next to them)
Click OK
Open the same dialog again and check corresponding SOLIDWORKS libraries. Those are usually available in the references list.
If not you can use 'Browse...' button to manually select the libraries from the SOLIDWORKS installation folder
Alternatively you can copy paste all the code to newly created macro.