Get or Set the Backup Directory Example (VBA)
This example shows how to get the SolidWorks backup directory. Use ISldworks::SetUserPreferenceStringValue
to set the backup directory.
'------------------------------------------------------------
Dim swApp As SldWorks.SldWorks
Dim swModel As SldWorks.ModelDoc2
Dim sString As String
Sub main()
Set swApp = CreateObject("SldWorks.Application")
Set swModel = swApp.ActiveDoc
sString = swApp.GetUserPreferenceStringValue(swBackupDirectory)
Debug.Print "Backup directory: "; sString
End Sub