Revit API view current phase

Revit API view current phase

Anonymous
Not applicable
2,620 Views
1 Reply
Message 1 of 2

Revit API view current phase

Anonymous
Not applicable

Hi,

 

I'm attempting to get access to my view's current phase via the API to compare the current phase to the phase created of the elements in that view. I.m having trouble accessing the phase of the view or floor plan. I've checked out and used several previous posts on this forum and have had no success.

 

Here's my code for trying to access the view's current phase.

 

View active = commandData.Application.ActiveUIDocument.ActiveGraphicalView;
string currentPhaseId = active.get_Parameter(BuiltInParameter.VIEW_PHASE).AsString();

 

Thanks in advance!

0 Likes
Accepted solutions (1)
2,621 Views
1 Reply
Reply (1)
Message 2 of 2

jeremytammik
Autodesk
Autodesk
Accepted solution

Dear Hersh,

 

Thank you for your query.

 

I see you submitted two separate threads for this question, and Naveen already very kindly answered you in your other thread:

 

https://forums.autodesk.com/t5/revit-api-forum/revit-api-view-current-phase/m-p/8860806

 

So, we can ignore this one, then, I assume.

 

Best regards,

 

Jeremy

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes