- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have been trying to override the Header section of the schedule with some border styles. I can easily change text properties (underline, italics, bold, text size etc) but cant seem to be able to change the border display/lineweight.
Here's what I am doing:
gStyles = FilteredElementCollector(doc).OfClass(GraphicsStyle).ToElements() for i in gStyles: if i.GraphicsStyleCategory.Name == "veryFatLineStyle": lineStyle = i hsd = tableData.GetSectionData(SectionType.Header) hsd.SetCellText(hsd.FirstRowNumber, hsd.FirstColumnNumber, "XYZ Schedule") if hsd.AllowOverrideCellStyle(hsd.FirstRowNumber, hsd.FirstColumnNumber): options = TableCellStyleOverrideOptions() options.BorderLineStyle = True options.BorderBottomLineStyle = True options.BorderLeftLineStyle = True options.BorderRightLineStyle = True options.BorderTopLineStyle = True tcs = TableCellStyle() tcs.SetCellStyleOverrideOptions(options) tcs.BorderBottomLineStyle = lineStyle.Id tcs.BorderLeftLineStyle = lineStyle.Id tcs.BorderRightLineStyle = lineStyle.Id tcs.BorderTopLineStyle = lineStyle.Id hsd.SetCellStyle(hsd.FirstRowNumber, hsd.FirstColumnNumber, tcs)
Can anyone tell me if I am making any mistakes? I am only confused by the BorderLineStyle method present in the TableCellStyleOverrideOptions while its not available in the TableCellStyle class.
Thanks!
Solved! Go to Solution.
Link copied