Grasshopper

algorithmic modeling for Rhino

Hi everyone

I am new to python, and even newer to python in grasshopper. When I try to use ghpythonlib.components Length function I get null/none instead of number. 

This is my code (also attached):

import ghpythonlib.components as ghcomp

a = ghcomp.Length(x)

What am I missing here? 

Views: 373

Attachments:

Replies to This Discussion

Hi Maciej,

That is quite usual question for all beginners.

You need to set your "Type hint" to "Curve" instead of "ghdoc Doc" which is by default.
Grasshopper requires objects to work on, not guids.

Attachments:

Thank you! 

RSS

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