Grasshopper

algorithmic modeling for Rhino

I tried to teach myself about the VB scripting by using the Grasshopper Primer, however, it was based on the 0.6.0007 version, what I am using now is 0.6.0059.

and I found there are a lot of differences in the VB component, for example, I type the exactly the same script as the tutorial said, but I can't see any result as the tutorial showed, moreover, at the chapter of Subs and Functions, those areas, such as "#Region "Additional methods and Type declarations",  I am supposed to be able to see when I double click the VB component are totally nonexisted.

I am totally lost in VB scripting, everything doesn't work for me...

Views: 238

Replies to This Discussion

For adding functions after the sub, there's an expandable "+" on the left in the grey area after "End Sub" (in the grey area to the right there is a "'/**/")...if you click on the "+" it will expand this into white space where you can write your functions.

You should also know that in order to use any of the built-in math functions (like sin, cos, tan, sqrt) you need to type "math." first, so what used to be "cos(Pi / 4)", for example, now has to be "math.cos(math.pi / 4)"
Wow, thank you so much I had been wondering how to write my own functions for so long!

Can you also write your own classes here as well?

Thanks,
Adam

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service