Fill rooms with a color based on a parameter value, and printing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I have made a plugin that automates the following process :
- create view filters based on chosen category(ies) and parameter.
- apply these filters to newly created views (view plans, view sections, etc).
My issue comes when dealing with rooms.
To fill rooms with some color (based on a parameter value), it seems that Revit encourages us to use the "color scheme" dialog box (awfully named BTW).
This part of Revit is as far as I know still not accessible with the API, the BuiltInParameter VIEW_SCHEMA_SETTING_FOR_BUILDING never returns a value (so for instance you cannot set the color scheme ElementId to InvalidElementId to remove it) :
// remove color scheme - no API access, built-in param not working Parameter vcc = view.get_Parameter(BuiltInParameter.VIEW_SCHEMA_SETTING_FOR_BUILDING); // vcc is always null here
if (null != vcc && !vcc.IsReadOnly) { vcc.Set(ElementId.InvalidElementId); }
So I tried to do as I did for other Revit categories : I made my rule-based view filters, and, provided that I enable the Room's visibility subcategory "Interior fills" in the V/G settings of a view, I can see the colored filters applied to it. Nice !
But after all this work, I read that room interior fills are no longer printable (apparently since Revit 2010), only the color schemes are printable.
It's even more complicated : when you have linked files, the room interior fills of the linked documents print, whereas those of the main document don't !
So here we are : on one side, the "color scheme" way which would be "printable" but is not accessible with the API ; and on the other side, the "classic" way of doing things, with view filters and "interior fills" visibility enabled, which can be API-driven but produces views that can't be correctly printed !
Does someone have an idea ?
Thanks for your help.
Maxime