I am attempting to assign options to a Revit OverrideGraphicsSettings:
OverrideGraphicSettings org = new OverrideGraphicSettings();
org.SetHalftone(true);
org.SetProjectionLineColor(Use_Color); org.SetProjectionFillColor(Use_Color);
org.SetProjectionFillPatternId(****);
doc.ActiveView.SetElementOverrides(ElementId Elem_Id, org);
This works, except for the following two problems:
- If I have already overridden in view to surface pattern from "By Material" to Solid Fill, the above code will DISABLE this override, returning it to By Material.
- The line with SetProjectionFillPatternId is disabled, because it isn't clear how to obtain a valid FillPatternId for Solid Fill.
My attempts at finding the answer include collection all defined materials and looping through them to find the Surface Pattern assigned, but I can't find the appropriate FillPatternId. Has anyone else dealt with this issue?