Assembly: RevitAPI (in RevitAPI.dll) Version: 22.214.171.124 (126.96.36.199)
A color scheme is based on element category and one of the category parameter, it contains a set of ColorFillSchemeEntry which stores parameter value, color, fill pattern and other entry data. The entry paramater values may be a range or a single value, based on the IsByRange property. Then elements with the specified category could be colored with the color and fill pattern of matching entry whose parameter value or value range matches the element parameter value.
Unlike most of the other elements, the color scheme works in an "asynchronous" way in UI:
- If document elements change, the color scheme will not be updated immediately.
- If color schemes changes, the document elements will not be updated immediately too.
API works slightly different with UI:
- GetEntries will return the entries corresponding to the latest document elements status immediately.
- The entries modification operation will retrieve the latest entries with GetEntries at first, and then modify those entries by request, but document elements will still not be updated immediately.
- To modify multiple entries, it's better to use but not modify them one by one with other methods for better performance.
- To apply a color scheme whose CategoryId property is OST_Areas to an area plan view, the AreaSchemeId property must be the same as the view if it is not used as a template.
- To generate a new color scheme, you have to use Duplicate(String) method to duplicate form an existing one.
- There should not exist two entries values that are the same in a color scheme. if the StorageType property is Double, then the value accuracy should be based on FormatOptions property.