Grasshopper

algorithmic modeling for Rhino

hello, I'm beginning with Vb script and have one question - probably very easy:
I found it in one book (as a part of GH def)

If s1.z = s2.z And s1.z = e1.z And s1.z = e2.z Then
s1_ = s1
e1_ = e1
s2_ = s2
e2_ = e2
End If

output message says: " 0. error: Public member 'z' on type 'Double' not found. (line: 0)"

I named all inputs and outputs as it is in the script.
greets

Views: 430

Replies to This Discussion

It looks like the script is meant to be used on Vectors or Points (or maybe even Planes). These types all have a Z property. Doubles (i.e. floating point numbers) do not. You're either feeding the wrong type of data into this script or maybe you've assigned the wrong kind of type-hint?

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Thanks ! Right, I was connecting numbers and not points but i guess most confusing part is that the component is turning red even when nothing is connected.(I used Gh 8.xxx)

cheers

It turns red because there's a compiler error (i.e. Public member 'z' on type 'Double' not found.). It's a bit odd that it supposedly happens on line 0.

 

What are your input parameter type-hints? Are they set to Double or Object or Point?

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

 

Yes, now when I changed input parameter type-hints from object to 3d point, Vb component turned gray.

Thanks again !

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