Grasshopper

algorithmic modeling for Rhino

Hi all,

I am using Python component in GH and trying to get a parametric coloring based on the height of each module.

I am getting the following error:

Runtime error (ArgumentTypeException): expected RhinoDoc, got GrasshopperDocument

I tried to switch to RhinoDoc by creating the 3rd class and performing the switch in there by using:

sc.doc = Rhino.RhinoDoc.ActiveDoc #sets the RhinoScript target to "Rhino document"

 

but this apply to the entire code and gives me bunch of error all over my script.

Any idea what I should do about this to get the colors working?

I have my GH file attached.

 

Thanks,

 

Naciem

Views: 617

Attachments:

Replies to This Discussion

i don't know much about python module,

but for VB, and C# scripting module "doc" is already preserved to represent current document.

if you use python in grasshopper scripting module, try just to use "doc"

Hi Yong Sung,

I am not very familiar with the difference between working with RhinoDoc vs. GHDoc. Thanks for pointing that out. I will look in to it.

Thanks,

Naciem

Have a look at Giulio's reply here

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service