@Dongyeop_Lee wrote:
I’m trying to create a python code using RhinoCommon to do multiple Rhino commands at once.
- NewFloatingViewport Projection Perspective
- MaxViewport
- Zoom Extents
- SetDisplayMode Mode Shade
I think the following code makes it to step 2, MaxViewport, but I can’t seem to complete the rest quickly. Can someone help? I don’t want to use rhinoscriptsyntax.Command(), because it made my Grasshopper file very unstable executing multiple commands.
import rhinoscriptsyntax as rs import Rhino import System from scriptcontext import doc if r: newView = Rhino.RhinoDoc.ActiveDoc.Views.Add("Test", Rhino.Display.DefinedViewportProjection.Perspective, System.Drawing.Rectangle(0, 0, 600, 600), True) newView.Maximized = True
Posts: 1
Participants: 1