2 Replies Latest reply on Apr 2, 2012 2:30 AM by Ivana Kolin

    Open Solidworks (specific version)

    Joecel Torres

      Hello.

          I have 2 versions of Solidworks installed on my PC.  

          How can I open a specific version using API?

          Thanks in advance.

       

      Regards,

      Joecel

        • Re: Open Solidworks (specific version)
          Keith Rice

          Joecel,

           

          SolidWorks has to be open already for you to use the API so you would need to open SLDWORKS.exe via some other method, like the Shell command in the case of VBA and System.Diagnostics.Process.Start in the case of .NET.  Someone can correct me if they know of a better way.  Anyway, with either of those functions you will need to point to the appropriate .exe so you can control which version is opened by the path you input.

           

          Of course, if you wanted to open up one version while the other version is open, then that is certainly possible using the above techniques.

           

          Keith

          Video Tutorials for the SolidWorks API

          • Re: Open Solidworks (specific version)
            Ivana Kolin

            force use of sw2010

             

            Set swApp =  CreateObject("SldWorks.Application.18")

             

            or if sw already running

             

            Set swApp = GetObject(, "SldWorks.Application.18")   

             

            sw2011  = SldWorks.Application.19” etc.