I am trying to start some action every time a newly created view (named “Testview” below) is activated.
But the event is fired every time any viewport is selected.
Yes that does the trick. Thanks a lot! So if I got it right, a named view can be created and this view can be displayed in different viewports? And does a viewport allways have the same name as the view that is beeing displayed using this viewport?
I guess so. But note that “Testview” is not a named view, it is just the viewport title of the new Rhino view added to the table. So you cannot switch to the top view and set it to “Testview”. Btw. You can also print the id of an active viewport using
e.View.ActiveViewportID
This might be more reliable in comparison to viewport titles.