VBA Macros, Type Libraries, and SOLIDWORKS Upgrade
When upgrading to a newer version of SOLIDWORKS, an existing VBA macro
might fail on this line of code:
Set swApp = Application.SldWorks
with this message:
Compile error:
Object library feature not supported
To resolve compile error:
Click Tools,
References in the IDE.
Select the SOLIDWORKS type libraries referenced
by the VBA macro.
Use the up- and down-arrow buttons to change the
priority of the selected SOLIDWORKS type libraries.
Click OK.
The type libraries should be reread by VBA. However, if the previous
procedure fails:
Click Tools,
References again.
Select a type library that is not used in the
macro.
Click OK.
The type libraries should be reread by VBA. Once the macro runs, you
can deselect the type library just selected.