Visual Studio vb manual

I’m trying to start with visual studio, especially I prefer VB, I have some basic notion so it will be easier for me to achieve the objective.

I’m trying something very easy like drawing a rectangle, something I can do with Python very easily and only with 3 lines of code

I can not find the logic, it seems very complicated, maybe it’s just the initial impression.

The question is, Is there an easy-to-understand manual?

Maybe my problem has been to start with python.

Hi @MatrixRatrix,

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.

– Dale

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?

thanks

– Dale