Grasshopper

algorithmic modeling for Rhino

Hi everybody, 


I am new at grasshopper and I am trying to learn the basics. I have a question about how to create a point in VB Script.  I would like to create a point from 3 input variables (x, y, z). The code I wrote up til now is this: 

Private Sub RunScript(ByVal x As Double, ByVal y As Double, ByVal z As Double, ByRef A As Object)

Dim pt (2)

pt(0) = x
pt(1) = y
pt(2) = z

A = pt


End Sub

Does anyone know what statement I need to write to make this code work? 

Kind regards

Jasper

Views: 776

Attachments:

Replies to This Discussion

Hi,

You have to declare the variable first, to clarify what is this about (i.e a Rhino.Geometry.Point3d member)

Dim pt as New Point3d(x,y,z)

A = pt

You should start learning VB by following one of the suggested primers.

Best,

M.

Hi Marios,

Thank you very much for your help and advice! 

Regards

Jasper

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