m mhb

Please give me some advice about cosmosmotion code

Discussion created by m mhb on Jun 10, 2007
I cannot get the root object of cosmosmotion, Please give me someadvice about cosmosmotion code

Sub main()
Dim swApp As SldWorks.SldWorks
Dim addin As CMotionSWAddin
Dim strDllFileName As String
Dim return_value As Integer
Set swApp = GetObject(, "SldWorks.Application")
strDllFileName = "C:\Program Files\SolidWorks\COSMOSMotion ForSolidWorks\cmotionsw.dll"
return_value = swApp.LoadAddIn(strDllFileName)
Set addin = swApp.GetAddInObject("COSMOSMotion")
End Sub