public static void HideElementTemporary(Document doc, Element ele) { View3D view3d = doc.ActiveView as View3D; if (ele != null && !ele.IsHidden(view3d)) { view3d.HideElementTemporary(ele.Id); } }