Good morning,
Can someone please take a look at my code, and let me know why my "SendKeys ("+(c)")" doesn't work? It does work in other macros that I have.
Thanks
Mark
' ******************************************************************************
' Macro by Mark Bradford
' ******************************************************************************
Option Explicit
Dim swApp As Object
Dim swModel As Object
Dim nErrors As Long
Dim nWarnings As Long
Dim bRet As Boolean
Dim Part As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
SendKeys ("+(c)") 'for Shift-c
Part.ShowNamedView2 "*Isometric", 7
Part.ViewZoomtofit2
boolstatus = Part.ForceRebuild3(True)
Set swModel = swApp.ActiveDoc
bRet = swModel.Save3(swSaveAsOptions_Silent, nErrors, nWarnings)
End Sub
SolidworksApi macros