Creigbm
Mechanical
- Aug 1, 2003
- 161
I am trying to set my current working directory to a network drive as shown below, but I am getting an error saying that there is no object defined. I didnt think I needed an object if I am just changing a setting. The point of this macro is to load/unload an addin without going through the tools menu. Thanks in advance for any help
Code:
Sub main()
Set swApp = Application.SldWorks
Const workDir = "\\Home\SolidModels\Integration\SolidWorks\"
swApp.SetCurrentWorkingDirectory (workDir)
retval = swApp.LoadAddIn(SW_Adept.dll)
If retval = 2 Then
swApp.UnloadAddIn (SW_Adept.dll)
End If
End Sub