Revit generally does not display all graphics or elements in any views by default. Each Revit template regardless of Architectural, Structural or MEP has its own Graphics/Element display settings. It makes sense most of times by doing so to meet the requirements of different disciplines.
However, sometimes, we may want to show up some types of elements such as Mass in some views that do not turn them on, or in the extreme case, show up all types of elements and in turn categories in a specific view or all of them. Here are a couple of help methods to use in this regard.
public class SettingAdjuster
public static void TurnOnAllGraphics(Autodesk.Revit.DB.View view)
foreach (Category cat in view.Document.Settings.Categories)
if( cat.get_AllowsVisibilityControl(view) )
public static void TurnOnAllGraphicsInActiveView(RvtDocument doc)
Here is some sample caller code.
After the code is executed, all will be visible in the Visibility/Graphic Overrides window.
Revit Addin Wizard (RevitAddinWizard) provides various wizards, coders and widgets to help program Revit addins. It can be downloaded from the Download link at the bottom of the blog index page.