SrfPtGrid from VB.net to Rhino HELP ME!

Hello, i use the following code to build surfaces in Rhino3 with VB6. Now i try to build this in vb.net to Rhino 5. Functions like “draw i line” to Rhino 5 works very well. But in vb.net don`t exist the funktion “array” and i am not experienced enough to translate this in vb.net. Can you help me???

         Dim Rhino As Object
        Dim RhinoScript As Object
        Dim arrCount(1), arrPoints(), arrClosed(1), arrDegree(1), nCount, flächY, flächX

        Set Rhino = CreateObject("Rhino3.Application")
        Set RhinoScript = Rhino.GetScriptObject()
        arrCount(0) = 10
        arrCount(1) = 10
        arrDegree(0) = 1
        arrDegree(1) = 1
        arrClosed(0) = vbFalse
        arrClosed(1) = vbFalse
        nCount = 0
            For flächY = 0 To arrCount(0) - 1
                For flächX = 0 To arrCount(1) - 1
                    arrPoints(nCount) = Array(flächX, flächY, 2)
                    nCount = nCount + 1
                Next flächX
            Next flächY
        RhinoScript.AddSrfPtGrid arrCount, arrPoints
        Set RhinoScript = Nothing
        Set Rhino = Nothing

Hi @t.egger,

When you say “VB.NET”, does this mean you are writing a Rhino plug-in using Visual Studio and Visual Basic? Or are you still automating Rhino, externally, like you’ve shown above?

– Dale

Hi Dale, i automating Rhino externally with Visual C or Visual Basic.
Thomas

Hi @t.egger,

Does this help?

https://stackoverflow.com/questions/241758/equivalent-of-array-in-vb-net

– Dale

Hi Dale,

Unfortunately not. I’m surprised that rhino has no examples in a current .NET language.
But I was able to work around the problem by creating an STL-file and importing it into Rhino

Thomas