Grasshopper

algorithmic modeling for Rhino

Is it possible to import the functionality of grasshopper plugin into a python script. For instance if i wanted to use a kangaroo or wb component inside a python script in grasshopper can I import that functionality. 


similar to: import rhinoscriptsyntax as rs
is there something similar to: import kangaroo

is there an option to do something like that or do you need to rewrite components to have that functionality?

Views: 711

Replies to This Discussion

Hi mprado,

 

if the add-on .gha you would like to reference exports some functionality, you should be able to import clr and then use the normal clr.AddReference and similar methods (you could try also with clr.AddReferenceToFileAndPath) to load it. There are some examples of this online.

Then, again if there are public class to use, you should be able to import the add-on namespaces and do things with them.

 

I hope this helps,

- Giulio

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2025   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service