Sub main() Set swApp = Application.SldWorks Set swMathUtils = swApp.GetMathUtility Set swAssy = swApp.ActiveDoc If Not swAssy Is Nothing Then Dim comp1Path As String Dim comp2Path As String comp1Path = swApp.GetCurrentMacroPathFolder() & "\1000_WT-Wagen_Variante_voll.1.sldprt" comp2Path = swApp.GetCurrentMacroPathFolder() & "\91039.2027__Entriegelung.sldprt" Dim swComp As SldWorks.Component2 'Following API call will fail as it is required to have the model loaded into the memory Set swComp = swAssy.AddComponent4(comp1Path, "", 0, 0, 0) Debug.Assert Not swComp Is Nothing 'Loading model invisibly swApp.DocumentVisible False, swDocumentTypes_e.swDocPART swApp.OpenDoc6 comp1Path, swDocumentTypes_e.swDocPART, swOpenDocOptions_e.swOpenDocOptions_Silent, "", 0, 0 swApp.DocumentVisible True, swDocumentTypes_e.swDocPART 'Now this API call succeeded Set swComp = swAssy.AddComponent4(comp1Path, "", 0, 0, 0) Debug.Assert Not swComp Is Nothing Dim strCompNames(13) As String Dim vTransformData As Variant Dim vComps As Variant Dim Count As Integer Path = "\\UNCPath_to_Components" sFileName = Dir(Path & "\*.sldprt") Count = 0 Do Until sFileName = "" strCompNames(Count) = Path & sFileName sFileName = Dir Count = Count + 1 Loop vTransformData = swMathUtils.CreateTransform(Empty).ArrayData 'It is not required to load document into memory if this method is used vComps = swAssy.AddComponents(strCompNames, vTransformData) Debug.Assert UBound(vComps) <> 1 Else MsgBox "Please open or create assembly" End If End Sub