To your specific question, you can add a rectangular polyline, using Visual Basic, like this:
Protected Overrides Function RunCommand(ByVal doc As RhinoDoc, ByVal mode As RunMode) As Result
Dim corners As Rhino.Geometry.Point3d() = Nothing
Dim rc As Rhino.Commands.Result = Rhino.Input.RhinoGet.GetRectangle(corners)
If rc <> Rhino.Commands.Result.Success Then
Return rc
End If
Dim points = New System.Collections.Generic.List(Of Rhino.Geometry.Point3d)
points.AddRange(corners)
points.Add(points(0)) ' Close curve
doc.Objects.AddPolyline(points)
doc.Views.Redraw()
Return Rhino.Commands.Result.Success
End Function
You can certainly use Visual Basic. However, most .NET developers are using C#. Thus, most all of our code samples are in C#. But, they can certainly be translated to Visual Basic.
My guess is you’re using the rhinoscriptsyntax function, which are a clone of RhinoScript. The functions in rhinoscriptsynax basically do what I’ve shown above.
I did not mind continuing to use Python, but I’m beginning to find some limitations, python is easy.
I think it’s time to go the other way, although it will be more painful and with a long learning curve (at least for me).
I had to take a quick look on C#, VB is not much different from C #, and probably
it is better not to look for shortcuts and focus directly on C # and eliminate distraction.
So, Is there somewhere I can easily ease my learning pain? easy manual?