Message 1 of 6
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I would like to get the style overides for the body headers of a schedule. However when I use this function, it does not return the correct values for font name, justification etc it seems size cannot be overidden.
Dim objScheduleDefinition As ScheduleDefinition = objViewSchedule.Definition
Dim ListOfRows As New List(Of String)
strRowHedding = "Headers" & clsReadWrite.strPublicConstCSVsepp & "Styles"
For Each objScheduleFieldId As ScheduleFieldId In objScheduleDefinition.GetFieldOrder
Dim objScheduleField As ScheduleField = objViewSchedule.Definition.GetField(objScheduleFieldId)
If Not objScheduleField.IsHidden Then
Dim objFormatOptions As FormatOptions = objScheduleField.GetFormatOptions
Dim objTableCellStyle As TableCellStyle = objScheduleField.GetStyle
Dim objHorizontalAlignmentStyle As HorizontalAlignmentStyle = objTableCellStyle.FontHorizontalAlignment
Dim objVerticalAlignmentStyle As VerticalAlignmentStyle = objTableCellStyle.FontVerticalAlignment
Dim strFontName As String = objTableCellStyle.FontName
Dim bolIsFontBold As Boolean = objTableCellStyle.IsFontBold
Dim bolIsFontItalic As Boolean = objTableCellStyle.IsFontItalic
Dim bolIsFontUnderline As Boolean = objTableCellStyle.IsFontUnderline
objViewSchedule.Document.GetElement(objViewSchedule.HeaderTextTypeId).Name
Dim dblTextSize As Double = Math.Round(objTableCellStyle.TextSize / 3.77952756, 1, MidpointRounding.AwayFromZero)
strRowHedding = strRowHedding & clsReadWrite.strPublicConstCSVsepp & Chr(34) & objScheduleField.ColumnHeading & "|" & strFontName & "|" & dblTextSize & "|Bold:" & bolIsFontBold & "|Underline:" & bolIsFontUnderline & "|Horiz:" & objHorizontalAlignmentStyle.ToString & "|Vert:" & objVerticalAlignmentStyle.ToString & Chr(34)
End If
Next
Kind Regards
David
Solved! Go to Solution.