Determine element phase visibility status for the current 3d view

Determine element phase visibility status for the current 3d view

pfk
Enthusiast Enthusiast
460 Views
1 Reply
Message 1 of 2

Determine element phase visibility status for the current 3d view

pfk
Enthusiast
Enthusiast

Hi

 

I would like to determine if a specific Element is visible in the current 3d View (ActiveView).  How can this be done pls taking into account the phase?  Element.IsHidden() returns False for demolished elements.  Revit2014 c#.

 

Thanks

 

Paul

0 Likes
461 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable

Revit will only report visible when you select an element in the phase it's created in. So what I once did is to loop through all phases in the project and see if the element I need is visible at this specific phase.

 

Something like:

 

FilteredElementCollector phaseColl = new FilteredElementCollector(doc).OfClass(typeof(Phase));

 

foreach (Phase ph in phaseColl.Cast<Phase>().Where(ph => ph != null))
{

  see if element is created in this phase and if it's visible

}

0 Likes