2 Replies Latest reply on Feb 15, 2013 4:54 PM by Elmar Klammer

    macro - linked library missing after uninstall

    Elmar Klammer



      I have following problem. I am working with SW  2010 sp5.1 and have a whole bunch of macro's that worked just fine. I had 2012 installed and took it off and after the uninstall,

      all my macros lost the link to the 2010 library now (under tools-references in vba editor). I have the macro folder and registry safed to external file and copy the marcro folder and SW registry before starting SW. Since I know that the files haven't changed, my question is, how can I get the VBA SW editor to use the 2010 library feature links.


      Maybe somebody knows. Any help is appriciated. I know i can manually update this. I am wondering how this happened and how can i change it back?





        • Re: macro - linked library missing after uninstall
          Keith Rice



          If I am understanding your issue correctly, your macros are no longer referencing the SolidWorks libraries. You should either be able to find them in the Tools-->References list under these names:


          SldWorks 2010 Type Library

          SldWorks 2010 Constant Type Library

          SldWorks 2010 Commands Type Library


          If you can't see them in the list, then you will need to Browse for them manually. If you are using the default SolidWorks installation directory then you should find them here:


          C:\Program Files\SolidWorks Corp\SolidWorks\sldworks.tlb

          C:\Program Files\SolidWorks Corp\SolidWorks\swconst.tlb

          C:\Program Files\SolidWorks Corp\SolidWorks\swcommands.tlb


          If this isn't working, you might also try creating a brand new macro. Does this have the appropriate references? Where are the libraries located? If a new macro is working, you could copy and paste your code from your old macros into new macro files, though this is tedious and probably unnecessary.



          Video Tutorials for the SolidWorks API

            • Re: macro - linked library missing after uninstall
              Elmar Klammer

              Hello Keith,


              Your list is correct. The strange thing is that the macros reference SW versions  2005 or 2007 or other. What puzzles me is that I copy the macros from another location and they can not be overwritten or changed. So why is it that all of a sudden all the type library links are changed. Before uninstalling 2012 they were all set to version 2010 and worked for the better part of 2 years.


              Now I need to go into each macro and reselect the library links.


              Any idea why this can be?