Preview | SOLIDWORKS USER FORUM
Use your SOLIDWORKS ID or 3DEXPERIENCE ID to log in.
LCLow Choon Yen17/12/2010
Hi,
Recently for no reason, i am unable to use SldWorks.OpenDoc6 method to load my solidworks files. Below is a snap shot of the part of the code which i used to open the solidworks file. I have even cut and paste the following code and paste into a fresh new macro but it still give me the same error massage "External component has thrown an exception."
Dimfile As String Dim mdl As ModelDoc2 Dim fileerror As Long Dim filewarning As Long file = 'The full location of my file including extension.
Try
mdl = swApp.OpenDoc6(file, swDocumentTypes_e.swDocPART, swOpenDocOptions_e.swOpenDocOptions_ReadOnly, "", fileerror, filewarning)
Catch ex As Exception
MsgBox(ex.Message) End Try Hope some one out there can help me on this.
Thanks