How to get notified to active view change in revit api ?

How to get notified to active view change in revit api ?

waleed.hany
Contributor Contributor
1,524 Views
4 Replies
Message 1 of 5

How to get notified to active view change in revit api ?

waleed.hany
Contributor
Contributor

Is there a way get notified / subscripe to change of active view in runtime in revit api ?

0 Likes
Accepted solutions (1)
1,525 Views
4 Replies
Replies (4)
Message 2 of 5

guillain.jolivet
Contributor
Contributor
Accepted solution

Yes, you can use two events of Revit API : ViewActivated and ViewActivating.

 

What to you want to do when you change the active view?

0 Likes
Message 3 of 5

waleed.hany
Contributor
Contributor

I am using a window (dialog box) that has a table listing all walls in a view.
since it is a dialogbox, a user can change view while the window is open, but the data in tahe table will not update unless we can know that the view has changed.
I will also try your suggestion

0 Likes
Message 4 of 5

guillain.jolivet
Contributor
Contributor

Is it a windows form dialog box? I don't know if you can perform this by changing the active view in revit.

 

You can put a combobox in your form to select a view, and display walls information about this view and change the active view in the application.

Message 5 of 5

waleed.hany
Contributor
Contributor

Tried ViewActivated event to achive list update when view changes. Worked nicely. Thanks Guillain