Roll Model View Example (VBA)
This example shows how to roll a model view by a specified angle.
'---------------------------------
'
' Preconditions: Part or assembly document is open.
'
' Postconditions: The model view rolls by the
' specified
angle.
'
'---------------------------------
Option Explicit
Dim swApp As SldWorks.SldWorks
Dim swModel As SldWorks.ModelDoc2
Dim swModelView As SldWorks.ModelView
Sub main()
Set swApp = Application.SldWorks
Set swModel = swApp.ActiveDoc
Set swModelView = swModel.ActiveView
' Roll the model view by the specified angle
swModelView.RollBy
(90#)
End Sub