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: 

Is it possible to listen for when the active view changes?

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
Maltezc
618 Views, 2 Replies

Is it possible to listen for when the active view changes?

Hi all, I have a pretty straight forward question.

 

As the post title suggests, is there a way to listen for when the active view changes? 

 

The closest thing I can come up with is getting all open UI views but that's not exactly a listener. 

 

 

Labels (2)
2 REPLIES 2
Message 2 of 3
RPTHOMAS108
in reply to: Maltezc

You probably need to clarify slightly:

A change relating to switching between one view and another

A change of something within the current view

 

If it's the former then you have UIApplication.ViewActivatedEvent

if it's the latter then  you have  ApplicationServices.Application.DocumentChanged (1) used in combination with FilteredElementCollector (2) set to the current view. Then compare the results of Ids in event args from (1) with that of the filter (2).

Message 3 of 3
TorsionTools
in reply to: Maltezc

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

Post to forums  

Forma Design Contest


Rail Community