DeerSpotter
Military
- Apr 27, 2022
- 2
let me know if there is a better way, this is my first post here on eng-tips
Option Strict Off
Imports System
Imports NXOpen
Module NXJournal
Sub Main
Dim theSession As Session = Session.GetSession()
Dim workPart As Part = theSession.Parts.Work
Dim displayPart As Part = theSession.Parts.Display
Dim startSheet As Drawings.DrawingSheet = theSession.Parts.Work.DrawingSheets.CurrentDrawingSheet
Dim views As ModelingViewCollection = workPart.ModelingViews
'iterate through the view collection
For Each vw As NXOpen.Drawings.DraftingView In startSheet.SheetDraftingViews
Dim editViewSettingsBuilder1 As NXOpen.Drawings.EditViewSettingsBuilder = Nothing
editViewSettingsBuilder1 = workPart.SettingsManager.CreateDrawingEditViewSettingsBuilder({vw})
Dim editsettingsbuilders1(0) As NXOpen.Drafting.BaseEditSettingsBuilder
editsettingsbuilders1(0) = editViewSettingsBuilder1
workPart.SettingsManager.ProcessForMultipleObjectsSettings(editsettingsbuilders1)
'change all view settings here use editViewSettingsBuilder1.yourcodehere
editViewSettingsBuilder1.ViewStyle.ViewStyleSmoothEdges.SmoothEdge = True
editViewSettingsBuilder1.ViewStyle.ViewStyleSmoothEdges.Color = workPart.Colors.Find("Light Gray")
editViewSettingsBuilder1.ViewStyle.ViewStyleSmoothEdges.Font = NXOpen.Preferences.Font.Phantom
editViewSettingsBuilder1.Commit()
next
End Sub
End Module