2 Replies Latest reply on Jan 12, 2015 10:33 AM by Cristiano Lautert


    Praveen R

      Modifying a line of code captured in solidworks environment, to Visual basic Getobject method in solidworks 2011

      Error: runtime error 429, ActiveX componenet can't create object


      Thanks in advance


        • Re: activex
          Matt Martens

          If there isn't a session of SW running GetObject method returns this error.


          On Error Resume Next

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

          If swApp Is Nothing Then 'if SW isn't running initiate using Shell and loop for 60 seconds

              Shell swStart "C:\Program Files\SolidWorks Corp\SolidWorks\SLDWORKS.exe", vbMaximizedFocus

              tStop = Timer + 60


                  If Timer > tStop Then 'time-out after 60 seconds

                      Exit Sub

                  End If

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

              Loop Until Not swApp Is Nothing 'loop until SW is running and swApp has been assigned

          End If


          I use this in MS Excel and MS Access to get the SW object. You will need to add the Microsoft Shell Controls and Automation reference.

          • Re: activex
            Cristiano Lautert

            I had the same problem. I solved using the new license key with document manager... And add the employed name in the license