I successfully created an Extrusion. How can I change the colour of the resulting Sweep object, in this case from the Default Grey to black?
Regards, Dirk
Dear Dirk,
The number of possible ways to control the colour of a Revit element is rather daunting:
http://thebuildingcoder.typepad.com/blog/about-the-author.html#5.24
I would say take your pick...
Also, always ask a product or content creation expert how this is best achieved through the user interface before even thinking about approaching it programmatically.
Please let us know how you end up solving this.
Thank you!
Cheers,
Jeremy
Hello Jeremy,
the solution under
http://thebuildingcoder.typepad.com/blog/2011/03/change-element-colour.html
looks good, however it's for a Project. Is there a similar solution for a FamilyDocument?
Regards, Dirk
Hello Jeremy,
OK, I found this method under [https://forums.autodesk.com/t5/revit-api-forum/how-change-the-color-a-element/td-p/5651177] which sort of works:
Color color = new Color(0, 0, 0); // RGB (0, 255, 255) OverrideGraphicSettings ogs = new OverrideGraphicSettings(); ogs.SetProjectionLineColor(color); ogs.SetProjectionFillColor(color); ogs.SetCutFillColor(color); ogs.SetCutLineColor(color); doc.ActiveView.SetElementOverrides(fiProfile.Id, ogs);
The problem is my ELement is a Family instance of a Sweep. So the Projection lines are in the right Color, but the Element itself is not really a solid, but just a composite of the projection lines. Thus the question becomes, how can I convert a FamilyInstance of a Sweep into a solid?
Regards, Dirk
Maybe the correct approach is to assign various subelements of your family definition different subcategories, and assign appropriate materials to those.
Ask a content creation expert, or explore it from the UI yourself.
Cheers,
Jeremy
Can't find what you're looking for? Ask the community or share your knowledge.