AnsweredAssumed Answered

Open file error using SldWorks.OpenDoc6

Question asked by 1-PQP3PM on Dec 17, 2010
Latest reply on Dec 20, 2010 by 1-PQP3PM

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

 

Outcomes