Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Determine element phase visibility status for the current 3d view

1 REPLY 1
Reply
Message 1 of 2
pfk
Enthusiast
403 Views, 1 Reply

Determine element phase visibility status for the current 3d view

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

1 REPLY 1
Message 2 of 2
Anonymous
in reply to: pfk

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

}

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


Rail Community