I think David is understating quite how different the two are.
Rhinoscript and VB.NET are syntactically similar (they are both
derived from the same source, after all) but they actually work in
very different ways.  .NET languages are fully Object Oriented (while
RhinoScript is, I believe, only Object Based).  I think a good place
to start would be to do a bit of research on object-oriented
programming theory just so you understand how this difference in
approach will affect what you're trying to do.  The chief difference
in this case specifically is that in Rhinoscript, your geometry
variables are actually only strings that reference the objects
themselves, which you pass into functions (as in Rhino.DoSomething
(...)) to tell Rhinoscript how to modifiy the geometry.  In VB.NET
however, you're storing your geometry as actual OpenNurbs 'objects'
which have their own functions built-in, so you tell them what to do
directly.  The result will be roughly the same but the methodology is
entirely different, so you can't just paste from one to the other and
expect it to work, unfortunately.

On Feb 16, 9:52 pm, David Rutten <[email protected]> wrote:
> Hi Matthew,
>
> full VB.NET documentation can be found on MSDN.com
> But note that VB in Grasshopper behaves a bit different from VB inside
> Visual Studio (the input/output parameter problem I mentioned
> earlier).
>
> It's not possible to make a RhinoScript component for Grasshopper. The
> two platforms cannot pass data between them.
>
> --
> David Rutten
> [email protected]
> Robert McNeel & Associates
>
> On Feb 16, 1:03 pm, matthew <[email protected]> wrote:
>
>
>
> > I have had no luck with friends from the office to find any literature
> > on VB. I have the Rhino Script pdf, but can't seem to find anything
> > for VB. How hard would it be to make a RhinoScript component for
> > Grasshopper, so I wouldn't have to figure out how to translate
> > RhinoScripts into VB? Any help with this is greatly appreciated for
> > those of us 'in training' !!!
>
> > On Feb 11, 12:55 pm, David Rutten <[email protected]> wrote:
>
> > > Hi Matthew,
>
> > > Yes, very much so. VB and C# are strongly typed languages, meaning all
> > > variables are of a specific type (integer, String, circle etc.) and
> > > they cannot be mixed up. The script that you paste into the VB
> > > Component only works for a specific collection of input and output
> > > parameters. By default, you get 2 inputs (both of type Object) and 1
> > > output. However, people often need more inputs, or they need the input
> > > to be of a specific type. So, when you copy-paste a bit of code, you
> > > have to make sure that the parameters of the new components have the
> > > same name and type as the original one.
>
> > > --
> > > David Rutten
> > > [email protected]
> > > Robert McNeel & Associates
>
> > > On Feb 11, 1:05 am, matthew <[email protected]> wrote:
>
> > > > Okay,
> > > > I am far newer to this than many of you...in fact I am quite green. I
> > > > do not know how to write code, I only know how to load prewritten
> > > > scripts and run them. So my question is about copying and pasting code
> > > > that I know works when I load it in the Rhino field. When I copy and
> > > > paste this same code into the source (middle area) of the VB.net
> > > > scriptable component, I am getting syntax errors. As a consequence, I
> > > > am getting no output data. Is the VB.net scriptable component of
> > > > Grasshopper less forgiving about syntax than Rhino Script?- Hide quoted 
> > > > text -
>
> - Show quoted text -

Reply via email to