Grasshopper

algorithmic modeling for Rhino

A script to open difinition from Rhino

Use this script to open specific definition...

-_RunPythonScript (

import Rhino
import System

gh = Rhino.RhinoApp.GetPlugInObject("Grasshopper")
gh.LoadEditor()
gh.ShowEditor()

gh.OpenDocument("D:\\Grasshopper\\file.gh")
)

 

...or use this to enter needed file name in command prompt 

-_RunPythonScript (

import Rhino
import System

filename = raw_input('File name')
path = "D:\\Grasshopper\\" + filename + ".gh"

gh = Rhino.RhinoApp.GetPlugInObject("Grasshopper")
gh.LoadEditor()
gh.ShowEditor()

gh.OpenDocument(path)
)

 

Views: 545

Comment

You need to be a member of Grasshopper to add comments!

Comment by John Everist on February 10, 2017 at 2:06am

Simple, concise and VERY useful for a starter. Thankyou Mkr.

About

Translate

Search

Photos

  • Add Photos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service