editSymbolDisplayBuilder

need some help,
any Idea why this fails at: ; editSymbolDisplayBuilder1.ApplyStyle() ?
TIA

Option Strict Off
Imports System
Imports NXOpen
Imports NXOpen.UF

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

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

Dim displayPart As Part = theSession.Parts.Display
Dim lw As ListingWindow = theSession.ListingWindow
'Dim customSymbol1 As Annotations.CustomSymbol = CType(workPart.FindObject("ENTITY 25 1 1"), Annotations.CustomSymbol)

For Each CustomSymbol As Annotations.CustomSymbol In workPart.Annotations.CustomSymbols
lw.WriteLine(CustomSymbol.tostring)
Try
Dim draftingCustomSymbolBuilder1 As Annotations.DraftingCustomSymbolBuilder
draftingCustomSymbolBuilder1 = workPart.Annotations.CustomSymbols.CreateDraftingCustomSymbolBuilder(CustomSymbol)

Dim baseCustomSymbol1 As Annotations.BaseCustomSymbol
baseCustomSymbol1 = draftingCustomSymbolBuilder1.GetSymbol()
Dim customSymbol2 As Annotations.CustomSymbol = CType(baseCustomSymbol1, Annotations.CustomSymbol)
Dim editSymbolDisplayBuilder1 As Annotations.EditSymbolDisplayBuilder
editSymbolDisplayBuilder1 = workPart.Annotations.CustomSymbols.EditSymbolDisplayBuilder(customSymbol2)
editSymbolDisplayBuilder1.Width = Annotations.EditSymbolDisplayBuilder.WidthTypes.ThicknessOne

editSymbolDisplayBuilder1.SelectComponent("Custom Symbol Text-1")
editSymbolDisplayBuilder1.Color = workPart.Colors.Find("Brown")
editSymbolDisplayBuilder1.Style.LetteringStyle.Angle = 10.0
editSymbolDisplayBuilder1.Style.LetteringStyle.DimLineSpaceFactor = 0.0
editSymbolDisplayBuilder1.Style.LetteringStyle.AppendedTextSpaceFactor = 0.0
editSymbolDisplayBuilder1.Style.LetteringStyle.ToleranceTextSpaceFactor = 0.0
editSymbolDisplayBuilder1.ApplyStyle()

Dim nXObject1 As NXObject
nXObject1 = editSymbolDisplayBuilder1.Commit()
editSymbolDisplayBuilder1.Destroy()

Dim nXObject2 As NXObject
nXObject2 = draftingCustomSymbolBuilder1.Commit()
draftingCustomSymbolBuilder1.Destroy()
Finally

End Try
next
End Sub

Public Function GetUnloadOption(ByVal dummy As String) As Integer
GetUnloadOption = UFConstants.UF_UNLOAD_IMMEDIATELY
End Function
End Module

What version of NX?

Also, I'd suggest adding a Catch in your Try block. You may be able to get more detailed error information from it.

Each CustomSymbol As Annotations.CustomSymbol In workPart.Annotations.CustomSymbols
lw.WriteLine(CustomSymbol.ToString)
Try
Dim draftingCustomSymbolBuilder1 As Annotations.DraftingCustomSymbolBuilder
draftingCustomSymbolBuilder1 = workPart.Annotations.CustomSymbols.CreateDraftingCustomSymbolBuilder(CustomSymbol)

Dim baseCustomSymbol1 As Annotations.BaseCustomSymbol
baseCustomSymbol1 = draftingCustomSymbolBuilder1.GetSymbol()
Dim customSymbol2 As Annotations.CustomSymbol = CType(baseCustomSymbol1, Annotations.CustomSymbol)
Dim editSymbolDisplayBuilder1 As Annotations.EditSymbolDisplayBuilder
editSymbolDisplayBuilder1 = workPart.Annotations.CustomSymbols.EditSymbolDisplayBuilder(customSymbol2)
editSymbolDisplayBuilder1.Width = Annotations.EditSymbolDisplayBuilder.WidthTypes.ThicknessOne

editSymbolDisplayBuilder1.SelectComponent("Custom Symbol Text-1")
editSymbolDisplayBuilder1.Color = workPart.Colors.Find("Brown")
editSymbolDisplayBuilder1.Style.LetteringStyle.Angle = 10.0
editSymbolDisplayBuilder1.Style.LetteringStyle.DimLineSpaceFactor = 0.0
editSymbolDisplayBuilder1.Style.LetteringStyle.AppendedTextSpaceFactor = 0.0
editSymbolDisplayBuilder1.Style.LetteringStyle.ToleranceTextSpaceFactor = 0.0
editSymbolDisplayBuilder1.ApplyStyle()

Dim nXObject1 As NXObject
nXObject1 = editSymbolDisplayBuilder1.Commit()
editSymbolDisplayBuilder1.Destroy()

Dim nXObject2 As NXObject
nXObject2 = draftingCustomSymbolBuilder1.Commit()
draftingCustomSymbolBuilder1.Destroy()

Catch ex As NXException
MsgBox(ex.Message, MsgBoxStyle.Critical + MsgBoxStyle.OkOnly, "Error: " & ex.ErrorCode)

End Try