Grasshopper

algorithmic modeling for Rhino

Hi,

Sorry about a noob question:

 

I'm trying to use rhinocommon with python to create a new viewport in rhino with the following method

Rhino.DocObjects.Tables.ViewTable.Add

 

the method requires the following inputs:

 

|              title: The title of the new Rhino view.

|              projection: A basic projection type.

|              position: A position.

|              floating: true if the view floats; false if it is docked.

|              Returns: The newly constructed Rhino view; or null on error.

However when I try to use it python gives an error:

 

Add() takes exactly 5 arguments (4 given)

I've figured out that it wants me to give it also the "self" argument:

 

Add(self: ViewTable, title: str, projection: DefinedViewportProjection, position: Rectangle, floating: bool)

However I have no idea what to give as a first argument.


Here is the code if it helps:

 

import Rhino.DocObjects.Tables as tables

import Rhino

import System

tables.ViewTable.Add("Testi",Rhino.Display.DefinedViewportProjection.Perspective,

System.Drawing.Rectangle(0,0,100, 100),True)

Thanks from your help in advance!

 

-Matti Pirinen

Views: 634

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