Grasshopper

algorithmic modeling for Rhino

My tutor gave me a ghpython script tutorial. At the beginning of the script, he imports AddReference from clr. And then he writes 'AddReference("Grasshopper")'. I tried to delete these two lines and found nothing happened. I don't quite understand what these two line mean in python. Can anyone tell me something about this?

Views: 503

Replies to This Discussion

Hi Wang

these two lines are no longer required in newer versions of GhPython, as GhPython now automatically does this for you.

These lines import the Grasshopper.dll file into Python memory, so that types within it will be found when you do "import Grasshopper".

http://blogs.msdn.com/b/haibo_luo/archive/2007/09/25/5130072.aspx

Giulio
--
Giulio Piacentino
geometrydepth.com design technology experts
info@geometrydepth.com

Thank you Giulio! You solved my problem!

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service