Option Explicit
Sub AutomatedCenterline()
On Error Resume Next
Dim doc As DrawingDocument
Set doc = ThisApplication.ActiveDocument
Dim oSheet As sheet
Set oSheet = doc.ActiveSheet
Dim oview As DrawingView
For Each oview In oSheet.DrawingViews
Dim oSettings As AutomatedCenterlineSettings
'Get the settings
Call oview.GetAutomatedCenterlineSettings(oSettings)
'Set the settings
oSettings.ApplyToBends = False
oSettings.ApplyToCircularPatterns = False
oSettings.ApplyToCylinders = True
oSettings.ApplyToFillets = False
oSettings.ApplyToHoles = True
oSettings.ApplyToPunches = True
oSettings.ApplyToRectangularPatterns = False
oSettings.ApplyToRevolutions = True
oSettings.ApplyToSketches = False
oSettings.ApplyToWorkFeatures = False
oSettings.ProjectionNormalAxis = True
oSettings.ProjectionParallelAxis = True
'Apply the settings
Call oview.SetAutomatedCenterlineSettings(oSettings)
Next
End Sub