Hi VB-NewBee question

I am trying to take a polyline into a VB.net, and the output I want to
be a Interpolated curve.
I get a error stream in my "out", which says"object reference not set
to an instance of an object"
I guess the mistake starts at "arrpts.Append(pline(i))",, but I just
don“t understand what I do wrong.

code:
Sub RunScript(ByVal polyline As OnCurve, ByVal y As Object)

    Dim pline As New OnPolyline
    Dim nurb As New onNurbsCurve
    Dim arrpts As New Arrayon3Dpoint()
    Dim i As Integer

    If polyline.IsPolyline(pline) Then
      For i = 0 To pline.Count()
        arrpts.Append(pline(i))
      Next
    End If
    rhutil.RhinoInterpCurve(3, arrpts, Nothing, Nothing, 0, nurb)
    A = nurb
End Sub

Stig

Reply via email to