Create Color Scheme

Create Color Scheme

Anonymous
Not applicable
1,243 Views
2 Replies
Message 1 of 3

Create Color Scheme

Anonymous
Not applicable

Hi,

 

I am referring to another forum topic <https://forums.autodesk.com/t5/revit-ideas/api-for-color-schemes-and-ability-to-control-rgb-colors/i...>

 

Does Revit API has any function to create color scheme? (for Areas specifically )

I also hope API has function to add/remove color scheme.

 

Alternatively, is there any API to define filters for areas in-order for me to change the color of areas.

 

Many thanks in advance for your kind attention

 

 

0 Likes
1,244 Views
2 Replies
Replies (2)
Message 2 of 3

aignatovich
Advisor
Advisor

Hi!

 

There is still no API for color schemes in current Revit version.

 

But you can create view filters and set yours colors and fill patterns. First of all you need to create ParameterFilterElement (or find existing one in the model). Look at ParameterFilterElement.Create static method. Then create filters (look at methods from ParameterFilterRuleFactory) and add them to your filter.

 

Then add filter to your view, just call view.AddFilter(filter.Id) and override graphic representation. Look at view.GetFilterOverrides / view.SetFilterOverrides and to the methods from OverrideGraphicSettings class.

 

 

0 Likes
Message 3 of 3

jeremy_tammik
Alumni
Alumni

Please check the public Revit roadmap:

 

https://blogs.autodesk.com/revit/2020/11/10/revit-public-roadmap-update-november-2020/

 

I just did, and have good news for you; Color Scheme API was released in Revit 2022:

 

https://trello.com/c/iKJRNvNS/53-color-scheme-api

 

Yup, I see it in the list of what's new:

 

2.2. Color Fill API

https://thebuildingcoder.typepad.com/blog/2021/04/whats-new-in-the-revit-2022-api.html#4.2.2

 

Cheers,

 

Jeremy

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes