Grasshopper

algorithmic modeling for Rhino

Hello,

I've been able to successfully detect a view port by type and use this to help control the display behavior of a custom plugin (ie. via doc.Views.ActiveView.ActiveViewport.Is...) but I am wondering if there is a method for detecting the active viewport.

Say, for example, a user has two viewports that are plan (top) views and I want to draw something in only the active top view - rather than both top views. Is there a way to detect just the active viewport and limit the display to it regardless of the viewport name or type?

Views: 657

Replies to This Discussion

Note that when viewports become inactive, they may not necessarily redraw. The attached script only draws a pink ball if the viewport is active, but you may end up with pink balls everywhere over time...

Attachments:

David - Thank you, it works like a charm!

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service