Grasshopper

algorithmic modeling for Rhino

what is the different  Between VB and VB.Net script?

Views: 1689

Replies to This Discussion

Basic is a programming language family. It was originally designed for students and other non-professional programmers. It is easier to learn than languages from the C family.

Visual Basic is essentially Basic with some GUI features. However it seems that Microsoft just likes prepending "visual" to their languages to make them seem more friendly or more powerful.

Visual Basic Script (or VBScript) is an interpreted language that is build into Windows Shell. A lot of applications (including Internet Explorer, Windows Explorer, Excel etc. etc.) can handle VBScript but it lacks a lot of functionality. It is basically a bare-boned implementation of the programming language.

Rhino adds several hundred functions to the several dozen or so that are in core VBScript. This extended language is called RhinoScript. Grasshopper does not support RhinoScript or VBScript.

VB.NET is a .NET implementation of the VB language. It is compiled rather than interpreted and fully Object Oriented. Programs written in VB.NET are compiled to MSIL assemblies which are then executed by the .NET framework. The core of Grasshopper itself has been written in VB.NET.

There is almost a complete overlap in terms of functionality between VB.NET and C#. These two languages basically generate exactly the same kind of executable. It is also possible to automatically and reliably convert VB.NET code into C# code and vice versa.

In Grasshopper the scripting components are perhaps poorly named. VB.NET and C# are not officially "scripted" languages. Perhaps I should have called them "Code components" instead. when you type code into the scripting components, Grasshopper will compile this code into actual DLLs which are then inserted into the Grasshopper solver tree.

It is also possible to write plug-ins for Rhino using VB.NET and C# (as indeed Grasshopper is a plugin to Rhino). To this end you will need to use an IDE such as Visual Studio to write and compile RHP files. You can also write plugins to Grasshopper using Visual Studio, in which case you make GHA files, but they are the same type of file as RHP and DLL, just with a different extension.

--

David Rutten

david@mcneel.com

Tirol, Austria

Thanks David for Reply , i am learn script code , i ask if i should learn Visual Basic language before begging work in the component and if there any tutorial or Example File to learn form it  

If you want to program within Grasshopper then your only good options are VB.NET or C#.

There's a lot to learn and it will take a long time. You can start here though and you can always ask questions.

--

David Rutten

david@mcneel.com

Tirol, Austria

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2025   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service