Message 1 of 10
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm looking into API to retrieve Color for given Area Type.
Quick search:
var schemes = new Autodesk.Revit.DB.FilteredElementCollector(doc)
.OfCategory(Autodesk.Revit.DB.BuiltInCategory.OST_ColorFillSchema)
.Select(s => s as ColorFillScheme);
var rentable = schemes
.Where(s => s.Name == "Rentable Area")
.FirstOrDefault();
List<ColorFillSchemeEntry> entries = rentable.GetEntries();
If I look on fields of each entry, I can find proper color, but not the name of given Area Type or any index. Entry.Caption or entry.GetStringValue() return empty string.
On GUI I clearly can see which color applies to which type, how can I find this relation by API?
Solved! Go to Solution.