I know this sounds like a relatively common issue but non of the common solutions have worked for me, and so I set out to ask my own question. I have a user who in 2018 copy and pasted a macro from the web to help with a job function. For the last two years this macro has worked but after being upgraded to 2020 the macro can't even get past the first line;
Set swApp = GetObject(,"Application.SldWorks")
The error thrown is a Run-time error '429' ActiveX component can't create object
I have tried to reset the libraries and have gone through multiple forum posts looking a solution but i have found nothing that encompasses the same subject, though this post was the closest to my exact issue. Any light that can be shed here is greatly appreciated. Below is the full code;
Dim swApp As SldWorks.SldWorks
Public Sub main()
Set swApp = GetObject(,"Application.SldWorks")
Dim ActiveDoc As ModelDoc2
Set ActiveDoc = GetObject(, "Sldworks.Application").ActiveDoc
If Not ActiveDoc Is Nothing Then
If ActiveDoc.GetType = 2 Then
GoTo Traverse
End If
End If
MsgBox ("This macro should be run, with an open assembly as the active document.")
Exit Sub
Traverse:
Dim myModel As ModelDoc2
Set myModel = ActiveDoc
Call Traverse(myModel, myModel.ConfigurationManager.ActiveConfiguration.Name)
MsgBox ("Done")
End Sub