How to Get Viewport Name with Mouse click or Command line option [ Python]

(Matt Gaydon) #1

Hi Everyone… again

I have worked out how to select the viewport I want to adjust from the command line , by getting the user to select from the list view names but this requires the user click on one of the ones in the list and if they have more than one with the same name its only shows the first one.

How would I go about setting up the code so that the user can either select from the list or click on a viewport and to define which view they wish to use. I have been looking at Rhino Common SKD and workflows using RhinoView.SetActive Event but not been able to get this to work.

Also is there any good tutorials on Event handling using Rhino Common with Python?? As would like to develop the code in the future to update based on changes made by the user using the Gumball.

Thanks Again

(Steve Baer) #2


Here’s a sample

(Matt Gaydon) #3

Thanks that’s perfect, somehow I missed that when I was looking though samples this time, even looked at the code before I think.

Any thoughts on learning event handling I should I stick to using Grasshopper for changes like moving a clipping plane with the Gumball.

thanks again

(Steve Baer) #4

Sorry, I don’t have any great resources right now for that. Probably easiest to just ask for specific things when you need them on this forum.