sheet 中未显示计划单元格覆盖背景颜色

Schedule Cell Override Background Color not showing in sheet

headingStyle.BackgroundColor = new ColorPreset()[ColorPresets.Cream];
headingStyle.SetCellStyleOverrideOptions(new TableCellStyleOverrideOptions() { BackgroundColor = true });

我正在应用覆盖来添加背景颜色。我正在设置单元格样式:

TableSectionData.SetCellStyle

TableSectionData.RefreshData

我已经尝试刷新数据,但是当一个实例被放置在 sheet 上时,覆盖不会显示,但它当然会显示在计划本身中。是否缺少使 sheet 背景颜色匹配的步骤?

我已经测试了很多变通方法,您无法设置 TableCellStyle.SheetBackgroundColor,并且它不会随着 BackgroundColor 的变化而改变。

覆盖单元格颜色的唯一方法是从现有 cell/field.

复制 TableCellStyle

一个简单的例子是创建一个虚拟明细表,在 Revit 中手动为 headers 着色,通过 API,获取它们的 TableCellStyle 并为其设置所需的字段样式。

我现在将一个时间表传递到我的方法中以获取其 TableCellStyleTableCellStyleOverrideOptions 以按照 Mahmoud AbdElMoneam 的建议更新目标单元格。

似乎 TableCellStyle.SheetBackgroundColor 应该有一个集合,或者 API 应该在 TableCellStyle.BackgroundColor[ 时私下设置它=18=]设置在API中。没有我想要的那么干净。