Temporary Hide and Unhide Elements in Revit API
There is a lot of code for temporary hiding on the internet. I’ll post the code directly here.
1 | // Temporary Hide |
Most blogs only explain how to hide elements, or just show the element display interface. However, in actual projects, what users mostly want is to directly cancel the temporary hide mode and continue working.
This article explains how to invoke the window for showing hidden elements in Revit.
Unhide:
- Confirm if it is hidden
1
Element(id).IsHidden(view)
- Unhide via API
1
doc.ActiveView.UnhideElements(ids);
- Check the result. If it still doesn’t appear, it might be an issue with the View Mode.
- If step 3 is problematic, you can use the interface below to deactivate all display modes in the view and check the result.
1
doc.ActiveView.TemporaryViewModes.DeactivateAllModes();
All articles on this blog are licensed under CC BY-NC-SA 4.0 unless otherwise stated.




