Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5938

Scripting ZoomToScreenRect

$
0
0

Hi there,

nothing seems to happen in my view when using ZoomToScreenRect in below example script:

import Rhino
import scriptcontext
import rhinoscriptsyntax as rs
import System

def DoSomething():
    
    rect = System.Drawing.Rectangle(50,50,400,300)
    view = scriptcontext.doc.Views.ActiveView.ActiveViewport
    info = Rhino.DocObjects.ViewportInfo(view)
    info.ZoomToScreenRect(rect)
    
    scriptcontext.doc.Views.ActiveView.Redraw()
    
DoSomething()

How is this supposed to work ?

thanks,
c.

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 5938

Trending Articles