Set Drafting Preferences

Hello NX Journaling,
Below is a small journal i recorded while setting the drafting preferences.
This may not be pure journal in it's form but just a method of resetting the drafting preferences before starting to work on a drafting. Many a times drawing downloaded from the client server which were previously worked upon a local NX had got the default preferences as per the client server NX. To overcome this, before continuing to work on this downloaded drawing, i would run this journal to set the drafting preferences as per our requirement. Journal can be updated to include more settings.

' NX 12.0.1.7
' Journal created by Balaji_Sampath03 on Thu Aug 22 20:32:14 2019 India Standard Time
'*******************************************************************************
'This Macro would set the drafting preferences as per the company standard requirements.
'*******************************************************************************
Imports System
Imports NXOpen

Module SetDraftingPref
Sub Main (ByVal args() As String)

Dim theSession As NXOpen.Session = NXOpen.Session.GetSession()
Dim workPart As NXOpen.Part = theSession.Parts.Work
Dim displayPart As NXOpen.Part = theSession.Parts.Display

Dim nXObject1 As NXOpen.NXObject = Nothing
Dim nXObject2 As NXOpen.NXObject = Nothing
'Dim nXObject3 As NXOpen.NXObject = Nothing

Dim preferencesBuilder1 As NXOpen.Drafting.PreferencesBuilder = Nothing
preferencesBuilder1 = workPart.SettingsManager.CreatePreferencesBuilder()

Dim nullNXOpen_Annotations_SimpleDraftingAid As NXOpen.Annotations.SimpleDraftingAid = Nothing
Dim draftingNoteBuilder1 As NXOpen.Annotations.DraftingNoteBuilder = Nothing
draftingNoteBuilder1 = workPart.Annotations.CreateDraftingNoteBuilder(nullNXOpen_Annotations_SimpleDraftingAid)

Dim leaderData1 As NXOpen.Annotations.LeaderData = Nothing
leaderData1 = workPart.Annotations.CreateLeaderData()

'---------------------------
'Common - Lettering Settings
'---------------------------

preferencesBuilder1.AnnotationStyle.LetteringStyle.GeneralTextColor = workPart.Colors.Find("Black")
preferencesBuilder1.AnnotationStyle.LetteringStyle.GeneralTextFont = 8
preferencesBuilder1.AnnotationStyle.LetteringStyle.GeneralTextLineWidth = NXOpen.Annotations.LineWidth.Thin
preferencesBuilder1.AnnotationStyle.LineArrowStyle.TextOverStubFactor = 0.3
preferencesBuilder1.AnnotationStyle.LineArrowStyle.DatumLengthPastArrow = 2.0

'-----------------------------------------
'Common - Line / Arrow Head Settings
'-----------------------------------------

preferencesBuilder1.AnnotationStyle.LineArrowStyle.FirstArrowheadColor = workPart.Colors.Find("Black")
preferencesBuilder1.AnnotationStyle.LineArrowStyle.FirstArrowheadFont = NXOpen.DisplayableObject.ObjectFont.Solid
preferencesBuilder1.AnnotationStyle.LineArrowStyle.FirstArrowheadWidth = NXOpen.Annotations.LineWidth.One
preferencesBuilder1.AnnotationStyle.LineArrowStyle.SecondArrowheadColor = workPart.Colors.Find("Black")
preferencesBuilder1.AnnotationStyle.LineArrowStyle.SecondArrowheadFont = NXOpen.DisplayableObject.ObjectFont.Solid
preferencesBuilder1.AnnotationStyle.LineArrowStyle.SecondArrowheadWidth = NXOpen.Annotations.LineWidth.One

'-----------------------------------------
'Common - Line / Arrow Line Settings
'-----------------------------------------

preferencesBuilder1.AnnotationStyle.LineArrowStyle.FirstArrowLineColor = workPart.Colors.Find("Black")
preferencesBuilder1.AnnotationStyle.LineArrowStyle.FirstArrowLineFont = NXOpen.DisplayableObject.ObjectFont.Solid
preferencesBuilder1.AnnotationStyle.LineArrowStyle.FirstArrowLineWidth = NXOpen.Annotations.LineWidth.One
preferencesBuilder1.AnnotationStyle.LineArrowStyle.SecondArrowLineColor = workPart.Colors.Find("Black")
preferencesBuilder1.AnnotationStyle.LineArrowStyle.SecondArrowLineFont = NXOpen.DisplayableObject.ObjectFont.Solid
preferencesBuilder1.AnnotationStyle.LineArrowStyle.SecondArrowLineWidth = NXOpen.Annotations.LineWidth.One

'-----------------------------------------
'Common - Line / Extension Line Settings
'-----------------------------------------

preferencesBuilder1.AnnotationStyle.LineArrowStyle.FirstExtensionLineColor = workPart.Colors.Find("Black")
preferencesBuilder1.AnnotationStyle.LineArrowStyle.FirstExtensionLineFont = NXOpen.DisplayableObject.ObjectFont.Solid
preferencesBuilder1.AnnotationStyle.LineArrowStyle.FirstExtensionLineWidth = NXOpen.Annotations.LineWidth.One
preferencesBuilder1.AnnotationStyle.LineArrowStyle.SecondExtensionLineColor = workPart.Colors.Find("Black")
preferencesBuilder1.AnnotationStyle.LineArrowStyle.SecondExtensionLineFont = NXOpen.DisplayableObject.ObjectFont.Solid
preferencesBuilder1.AnnotationStyle.LineArrowStyle.SecondExtensionLineWidth = NXOpen.Annotations.LineWidth.One

'--------------------------------------
'Common - Dimension Break Line Settings
'--------------------------------------

preferencesBuilder1.AnnotationStyle.BreakSettings.CreateBreaks = True

'------------------------
'Common - Symbol Settings
'------------------------

preferencesBuilder1.AnnotationStyle.SymbolStyle.UserDefinedSymbolColor = workPart.Colors.Find("Black")
preferencesBuilder1.AnnotationStyle.SymbolStyle.UserDefinedSymbolFont = NXOpen.DisplayableObject.ObjectFont.Solid
preferencesBuilder1.AnnotationStyle.SymbolStyle.UserDefinedSymbolWidth = NXOpen.Annotations.LineWidth.One

' ----------------------------------------------
' Dialog Begin Drafting Preferences
' ----------------------------------------------

preferencesBuilder1.ViewStyle.ViewStyleGeneral.ExtractedEdges = NXOpen.Preferences.GeneralExtractedEdgesOption.Associative

' -----------------------------
'View - Common - Angle Settings
' -----------------------------

preferencesBuilder1.ViewStyle.ViewStyleGeneral.AngleSetting.AngleValue = 0.0
preferencesBuilder1.ViewStyle.ViewStyleGeneral.AngleSetting.SetIsMeasure(False)
preferencesBuilder1.ViewStyle.ViewStyleGeneral.AngleSetting.CreateScalarObject()
preferencesBuilder1.ViewStyle.ViewStyleGeneral.AnglePrecision = 2
preferencesBuilder1.ViewStyle.ViewStyleGeneral.AngleDecimalPointCharacter = NXOpen.Preferences.DecimalPointCharacter.Period
preferencesBuilder1.ViewStyle.ViewStyleGeneral.AngleShowLeadingZeros = True
preferencesBuilder1.ViewStyle.ViewStyleGeneral.AngleShowTrailingZeros = False

' ------------------------------------
'View - Common - Visible Line Settings
' ------------------------------------

preferencesBuilder1.ViewStyle.ViewStyleVisibleLines.VisibleColor = workPart.Colors.Find("Black")
preferencesBuilder1.ViewStyle.ViewStyleVisibleLines.VisibleFont = NXOpen.DisplayableObject.ObjectFont.Solid
preferencesBuilder1.ViewStyle.ViewStyleVisibleLines.VisibleWidth = NXOpen.Preferences.Width.Three

' -----------------------------------
'View - Common - Hidden Line Settings
' -----------------------------------

preferencesBuilder1.ViewStyle.ViewStyleHiddenLines.Color = workPart.Colors.Find("Black")
preferencesBuilder1.ViewStyle.ViewStyleHiddenLines.Font = NXOpen.Preferences.Font.Invisible
preferencesBuilder1.ViewStyle.ViewStyleHiddenLines.Width = NXOpen.Preferences.Width.Two

' ---------------------------------------------
'View - Common - Virtual Intersections Settings
' ---------------------------------------------

preferencesBuilder1.ViewStyle.ViewStyleVirtualIntersections.Color = workPart.Colors.Find("Black")
preferencesBuilder1.ViewStyle.ViewStyleVirtualIntersections.Font = NXOpen.DisplayableObject.ObjectFont.Solid
preferencesBuilder1.ViewStyle.ViewStyleVirtualIntersections.Width = NXOpen.Preferences.Width.Two

' ------------------------------
'View - Common - Thread Settings
' ------------------------------

preferencesBuilder1.ViewStyle.ViewStyleThreads.StandardData = 4

' ------------------------------------
'View - Common - Smooth Edges Settings
' ------------------------------------

preferencesBuilder1.ViewStyle.ViewStyleSmoothEdges.Color = workPart.Colors.Find("Black")
preferencesBuilder1.ViewStyle.ViewStyleSmoothEdges.Font = NXOpen.DisplayableObject.ObjectFont.Solid
preferencesBuilder1.ViewStyle.ViewStyleSmoothEdges.Width = NXOpen.Preferences.Width.Two

' -----------------------------------
'View - Base / Drawing Label Settings
' -----------------------------------

preferencesBuilder1.ViewStyle.ViewStyleBase.InheritClippingBoundary = False
preferencesBuilder1.ViewLabel.LabelPosition = NXOpen.Drawings.LabelPositionTypes.Above
preferencesBuilder1.ViewLabel.ShowViewLabel = True
preferencesBuilder1.ViewLabel.ViewLabelOption = NXOpen.Drawings.ViewLabelTypes.Name
preferencesBuilder1.ViewLabel.LetterFormat = NXOpen.Drawings.LetterFormatTypes.A
preferencesBuilder1.ViewLabel.LabelPrefix = ""
preferencesBuilder1.ViewLabel.LabelCharacterHeightFactor = 2.0

preferencesBuilder1.ViewLabel.ShowViewScale = True
preferencesBuilder1.ViewLabel.ScalePosition = NXOpen.Drawings.ScalePositionTypes.After
preferencesBuilder1.ViewLabel.ScalePrefix = ""
preferencesBuilder1.ViewLabel.PrefixCharacterHeightFactor = 1.0
preferencesBuilder1.ViewLabel.ScaleCharacterHeightFactor = 1.0
preferencesBuilder1.ViewLabel.IncludeParentheses = True

' -----------------------------------
'View - Projected View Label Settings
' -----------------------------------

preferencesBuilder1.ViewStyle.ViewProjectedArrowSettings.LineColorFontWidth.LineColor = workPart.Colors.Find("Black")
preferencesBuilder1.ViewStyle.ViewProjectedViewSettings.DisplayArrowOnParentView = NXOpen.Drawings.ViewProjectedViewSettingsBuilder.DisplayArrowOnParentViewType.All
preferencesBuilder1.ViewProjectedLabel.LabelPosition = NXOpen.Drawings.LabelPositionTypes.Above
preferencesBuilder1.ViewProjectedLabel.ShowViewLabel = True
preferencesBuilder1.ViewProjectedLabel.ViewLabelOption = NXOpen.Drawings.ViewLabelTypes.Name
preferencesBuilder1.ViewProjectedLabel.LabelPrefix = ""
preferencesBuilder1.ViewProjectedLabel.LetterFormat = NXOpen.Drawings.LetterFormatTypes.A
preferencesBuilder1.ViewProjectedLabel.IncludeRotationAngle = True
preferencesBuilder1.ViewProjectedLabel.LabelCharacterHeightFactor = 2.0

preferencesBuilder1.ViewProjectedLabel.ShowViewScale = True
preferencesBuilder1.ViewProjectedLabel.ScalePosition = NXOpen.Drawings.ScalePositionTypes.After
preferencesBuilder1.ViewProjectedLabel.ScalePrefix = ""
preferencesBuilder1.ViewProjectedLabel.PrefixCharacterHeightFactor = 1.0
preferencesBuilder1.ViewProjectedLabel.ScaleCharacterHeightFactor = 1.0
preferencesBuilder1.ViewProjectedLabel.IncludeParentheses = True

' ---------------------------------
'View - Section View Label Settings
' ---------------------------------

preferencesBuilder1.ViewStyle.ViewStyleSection.Background = True
preferencesBuilder1.ViewStyle.ViewStyleSection.SheetBodies = True
preferencesBuilder1.ViewStyle.ViewStyleSection.Crosshatch = True
preferencesBuilder1.ViewStyle.ViewStyleSection.AdjacencyToleranceData = 1.0

preferencesBuilder1.ViewSectionLabel.LabelPosition = NXOpen.Drawings.LabelPositionTypes.Above
preferencesBuilder1.ViewSectionLabel.ShowViewLabel = True
preferencesBuilder1.ViewSectionLabel.ViewLabelOption = NXOpen.Drawings.ViewLabelTypes.Name
preferencesBuilder1.ViewSectionLabel.LabelPrefix = ""
preferencesBuilder1.ViewSectionLabel.LetterFormat = NXOpen.Drawings.LetterFormatTypes.A
preferencesBuilder1.ViewSectionLabel.IncludeRotationAngle = True
preferencesBuilder1.ViewSectionLabel.LabelCharacterHeightFactor = 2.0
preferencesBuilder1.ViewSectionLabel.ShowViewScale = True

preferencesBuilder1.ViewSectionLabel.ScalePosition = NXOpen.Drawings.ScalePositionTypes.After
preferencesBuilder1.ViewSectionLabel.ScalePrefix = ""
preferencesBuilder1.ViewSectionLabel.PrefixCharacterHeightFactor = 1.0
preferencesBuilder1.ViewSectionLabel.ScaleCharacterHeightFactor = 1.0
preferencesBuilder1.ViewSectionLabel.IncludeParentheses = True

' --------------------------------
'View - Detail View Label Settings
' --------------------------------

preferencesBuilder1.ViewStyle.ViewStyleDetail.ViewBoundaryWidth = NXOpen.Preferences.Width.Two
preferencesBuilder1.ViewStyle.ViewStyleDetail.ViewBoundaryColor = workPart.Colors.Find("Black")
preferencesBuilder1.ViewDetailLabel.TextPlacement = NXOpen.Drawings.ViewDetailLabelBuilder.LabelParentTextPlacement.AboveStub

preferencesBuilder1.ViewDetailLabel.ShowViewLabel = True
preferencesBuilder1.ViewDetailLabel.LabelPosition = NXOpen.Drawings.LabelPositionTypes.Above
preferencesBuilder1.ViewDetailLabel.ViewLabelOption = NXOpen.Drawings.ViewLabelTypes.Name
preferencesBuilder1.ViewDetailLabel.LabelPrefix = ""
preferencesBuilder1.ViewDetailLabel.LetterFormat = NXOpen.Drawings.LetterFormatTypes.A
preferencesBuilder1.ViewDetailLabel.LabelCharacterHeightFactor = 2.0
preferencesBuilder1.ViewDetailLabel.ShowViewScale = True
preferencesBuilder1.ViewDetailLabel.LabelParentDisplay = NXOpen.Drawings.ViewDetailLabelBuilder.LabelParentDisplayTypes.Label

preferencesBuilder1.ViewDetailLabel.ScalePosition = NXOpen.Drawings.ScalePositionTypes.After
preferencesBuilder1.ViewDetailLabel.ScalePrefix = ""
preferencesBuilder1.ViewDetailLabel.PrefixCharacterHeightFactor = 1.0
preferencesBuilder1.ViewDetailLabel.ScaleCharacterHeightFactor = 1.0
preferencesBuilder1.ViewDetailLabel.IncludeParentheses = True

' ---------------------------
'View - Section Line Settings
' ---------------------------

preferencesBuilder1.ViewSectionLine.LineColorFontWidth.LineColor = workPart.Colors.Find("Black")
preferencesBuilder1.ViewSectionLine.LineColorFontWidth.LineWidth = NXOpen.Preferences.Width.Two
preferencesBuilder1.ViewSectionLine.LineColorFontWidth.LineFont.LineFont = NXOpen.LineFontBuilder.LineFontType.Centerline

' -----------------------------
'Dimension - Tolerance Settings
' -----------------------------

preferencesBuilder1.AnnotationStyle.DimensionStyle.ToleranceType = NXOpen.Annotations.ToleranceType.None
preferencesBuilder1.AnnotationStyle.DimensionStyle.DimZeroToleranceDisplayStyle = NXOpen.Annotations.ZeroToleranceDisplayStyle.AsZero
preferencesBuilder1.AnnotationStyle.DimensionStyle.AngularToleranceValuePrecision = 2
preferencesBuilder1.AnnotationStyle.DimensionStyle.ToleranceValuePrecision = 2
preferencesBuilder1.AnnotationStyle.UnitsStyle.DisplayLeadingToleranceZeros = True

' ----------------------------------
'Dimension - Dual Dimension Settings
' ----------------------------------

preferencesBuilder1.AnnotationStyle.UnitsStyle.DualDimensionFormat = NXOpen.Annotations.DualDimensionPlacement.None

' --------------------------
'Dimension - Narrow Settings
' --------------------------

preferencesBuilder1.AnnotationStyle.DimensionStyle.NarrowDisplayType = NXOpen.Annotations.NarrowDisplayOption.None

' --------------------------------------
'Dimension - Ordinate dimension Settings
' --------------------------------------
preferencesBuilder1.AnnotationStyle.OrdinateStyle.DoglegCreationOption = NXOpen.Annotations.OrdinateDoglegCreationOption.No
preferencesBuilder1.AnnotationStyle.OrdinateStyle.DisplayNameStyle = NXOpen.Annotations.OrdinateOriginDisplayOption.NoText
preferencesBuilder1.AnnotationStyle.OrdinateStyle.OrdinateTextOrientation = NXOpen.Annotations.TextOrientation.Horizontal
preferencesBuilder1.AnnotationStyle.OrdinateStyle.OrdinateTextOrientation = NXOpen.Annotations.TextOrientation.OverDimensionLine

' -----------------------------------------------
'Dimension - Text Orientation & Location Settings
' -----------------------------------------------

preferencesBuilder1.AnnotationStyle.DimensionStyle.Orientation = NXOpen.Annotations.TextOrientation.OverDimensionLine
preferencesBuilder1.AnnotationStyle.DimensionStyle.TextPosition = NXOpen.Annotations.TextPosition.AboveStub

' ------------------------------
'Dimension - Text Units Settings
' ------------------------------
preferencesBuilder1.AnnotationStyle.UnitsStyle.DimensionLinearUnits = NXOpen.Annotations.DimensionUnit.Millimeters
preferencesBuilder1.AnnotationStyle.DimensionStyle.AngularDimensionValuePrecision = 2
preferencesBuilder1.AnnotationStyle.DimensionStyle.DimensionValuePrecision = 2
preferencesBuilder1.AnnotationStyle.UnitsStyle.DecimalPointCharacter = NXOpen.Annotations.DecimalPointCharacter.Period
preferencesBuilder1.AnnotationStyle.UnitsStyle.DisplayLeadingDimensionZeros = True
preferencesBuilder1.AnnotationStyle.UnitsStyle.DisplayTrailingZeros = False

' ----------------------------------
'Dimension - Dimension Text Settings
' ----------------------------------

preferencesBuilder1.AnnotationStyle.LetteringStyle.DimensionTextFont = 8
preferencesBuilder1.AnnotationStyle.LetteringStyle.DimensionTextColor = workPart.Colors.Find("Green")
preferencesBuilder1.AnnotationStyle.LetteringStyle.DimensionTextLineWidth = NXOpen.Annotations.LineWidth.Thin

' ---------------------------------
'Dimension - Appended Text Settings
' ---------------------------------

preferencesBuilder1.AnnotationStyle.LetteringStyle.AppendedTextFont = 8
preferencesBuilder1.AnnotationStyle.LetteringStyle.AppendedTextColor = workPart.Colors.Find("Brown")
preferencesBuilder1.AnnotationStyle.LetteringStyle.AppendedTextLineWidth = NXOpen.Annotations.LineWidth.Thin

' ----------------------------------
'Dimension - Tolerance Text Settings
' ----------------------------------

preferencesBuilder1.AnnotationStyle.LetteringStyle.ToleranceTextColor = workPart.Colors.Find("Strong Stone")
preferencesBuilder1.AnnotationStyle.LetteringStyle.ToleranceTextFont = 8
preferencesBuilder1.AnnotationStyle.LetteringStyle.ToleranceTextLineWidth = NXOpen.Annotations.LineWidth.Thin

' ------------------------
'Annotation - GDT Settings
' ------------------------

preferencesBuilder1.AnnotationStyle.SymbolStyle.GdtSymbolColor = workPart.Colors.Find("Yellow")
preferencesBuilder1.AnnotationStyle.SymbolStyle.GdtSymbolFont = NXOpen.DisplayableObject.ObjectFont.Solid
preferencesBuilder1.AnnotationStyle.SymbolStyle.GdtSymbolWidth = NXOpen.Annotations.LineWidth.Two

' ---------------------------------------------
'Annotation - Symbol Style - Id Symbol settings
' ---------------------------------------------
preferencesBuilder1.AnnotationStyle.SymbolStyle.IdSymbolColor = workPart.Colors.Find("Yellow")
preferencesBuilder1.AnnotationStyle.SymbolStyle.IdSymbolFont = NXOpen.DisplayableObject.ObjectFont.Solid
preferencesBuilder1.AnnotationStyle.SymbolStyle.IdSymbolWidth = NXOpen.Annotations.LineWidth.Two

' --------------------------------------------------
'Annotation - Symbol Style - Surface Finish settings
' --------------------------------------------------
preferencesBuilder1.AnnotationStyle.SymbolStyle.SurfaceFinishColor = workPart.Colors.Find("Yellow")
preferencesBuilder1.AnnotationStyle.SymbolStyle.SurfaceFinishFont = NXOpen.DisplayableObject.ObjectFont.Solid
preferencesBuilder1.AnnotationStyle.SymbolStyle.SurfaceFinishWidth = NXOpen.Annotations.LineWidth.Two

' -----------------------------------------------
'Annotation - Symbol Style - Weld Symbol settings
' -----------------------------------------------
preferencesBuilder1.AnnotationStyle.SymbolStyle.WeldSymbolColor = workPart.Colors.Find("Yellow")
preferencesBuilder1.AnnotationStyle.SymbolStyle.WeldSymbolFont = NXOpen.DisplayableObject.ObjectFont.Solid
preferencesBuilder1.AnnotationStyle.SymbolStyle.WeldSymbolWidth = NXOpen.Annotations.LineWidth.Two

' -------------------------------------------------
'Annotation - Symbol Style - Target Symbol settings
' -------------------------------------------------
preferencesBuilder1.AnnotationStyle.SymbolStyle.TargetSymbolColor = workPart.Colors.Find("Yellow")
preferencesBuilder1.AnnotationStyle.SymbolStyle.TargetSymbolFont = NXOpen.DisplayableObject.ObjectFont.Phantom
preferencesBuilder1.AnnotationStyle.SymbolStyle.TargetSymbolWidth = NXOpen.Annotations.LineWidth.Two

' -------------------------------------------------------
'Annotation - Symbol Style - Intersection Symbol settings
' -------------------------------------------------------
preferencesBuilder1.AnnotationStyle.SymbolStyle.IntersectionSymbolColor = workPart.Colors.Find("Yellow")
preferencesBuilder1.AnnotationStyle.SymbolStyle.IntersectionSymbolFont = NXOpen.DisplayableObject.ObjectFont.Phantom
preferencesBuilder1.AnnotationStyle.SymbolStyle.IntersectionSymbolWidth = NXOpen.Annotations.LineWidth.Two

' -----------------------------------------------------
'Annotation - Symbol Style - Center Line Symbol settings
' -----------------------------------------------------
preferencesBuilder1.AnnotationStyle.SymbolStyle.CenterlineSymbolColor = workPart.Colors.Find("Black")
preferencesBuilder1.AnnotationStyle.SymbolStyle.CenterlineSymbolWidth = NXOpen.Annotations.LineWidth.Two

' --------------------------------------------
'Annotation - Cross Hatch / Area Fill Settings
' --------------------------------------------

preferencesBuilder1.AnnotationStyle.HatchStyle.Color = workPart.Colors.Find("Black")
preferencesBuilder1.AnnotationStyle.HatchStyle.HatchAngle = 45.0
preferencesBuilder1.AnnotationStyle.HatchStyle.LineWidth = NXOpen.Annotations.LineWidth.Two

' -----------------------------
'Table - Common - Cell Settings
' -----------------------------

preferencesBuilder1.TableCellStyle.TextAlignment = NXOpen.Annotations.TableCellStyleBuilder.TextAlignmentType.MidCenter
preferencesBuilder1.TableCellStyle.BorderColor = 216
preferencesBuilder1.TableCellStyle.ZeroDisplay = NXOpen.Annotations.TableCellStyleBuilder.ZeroDisplayType.Dash
preferencesBuilder1.TableCellStyle.BorderFont = 1
preferencesBuilder1.TableCellStyle.BorderWidth = 6
preferencesBuilder1.TableCellStyle.TabDirection = NXOpen.Annotations.TableCellStyleBuilder.TabDirectionType.Down
preferencesBuilder1.TableCellStyle.TextAlignment = NXOpen.Annotations.TableCellStyleBuilder.TextAlignmentType.MidCenter

' --------------------------------
'Table - Common - Section Settings
' --------------------------------

preferencesBuilder1.TableSection.HeaderLocation = NXOpen.Annotations.TableSectionStyleBuilder.LocationOfHeader.Above
preferencesBuilder1.TableSection.MaximumHeight = 2000.0
preferencesBuilder1.TableSection.AlignmentPosition = NXOpen.Annotations.TableSectionStyleBuilder.AlignmentPositionType.TopLeft

' -----------------------------------
'Table - Common - Parts List Settings
' -----------------------------------

preferencesBuilder1.PartsList.GrowDirectionOptions = NXOpen.Annotations.PartsListBuilder.PartsListGrowDirectionOptions.Down
preferencesBuilder1.PartsList.AutomaticUpdate = False
preferencesBuilder1.PartsList.SortOnUpdate = False
preferencesBuilder1.PartsList.AllowManualRows = True

' -----------------------------------
'Table - Common - Tabular Note Settings
' -----------------------------------

preferencesBuilder1.TabularNoteStyle.LockTableFormat = True
preferencesBuilder1.TabularNoteStyle.LockTableContents = True

' -----------------------------------
'Drafting / Leader Note Settings
' -----------------------------------

draftingNoteBuilder1.Origin.Anchor = NXOpen.Annotations.OriginBuilder.AlignmentPosition.MidCenter
draftingNoteBuilder1.TextAlignment = NXOpen.Annotations.DraftingNoteBuilder.TextAlign.Belowbottom

leaderData1.StubSize = 5
leaderData1.Arrowhead = NXOpen.Annotations.LeaderData.ArrowheadType.FilledArrow
leaderData1.VerticalAttachment = NXOpen.Annotations.LeaderVerticalAttachment.Center
leaderData1.StubSide = NXOpen.Annotations.LeaderSide.Inferred

End Sub
End Module

Thanks for sharing your code. It is rare, but nice, when you can get everything you need from a recorded journal with no edits required!