Returns the width and height in pixels of the specified view.
rhinoscriptsyntax.ViewSize (view=None)
rhinoscript.view.ViewSize (view=None)
view |
Optional. String or Guid. The title or identifier of the view. If omitted, the current active view is used. |
list |
A zero-based, one-dimensional array containing two numbers identifying the width and height if successful |
None |
If not successful, or on error. |
import rhinoscriptsyntax as rs
size = rs.ViewSize()
if size:
print "Width: ", size[0], " pixels."
print "Height: ", size[1], " pixels."