Also, the editor should have tooltips that tell you what arguments are
required when you're calling a function.
And of course the error message stated the problem as well, but
writing code by means of reading compiler errors is cumbersome in the
extreme.

--
David Rutten
[email protected]
Robert McNeel & Associates


On Feb 16, 1:49 am, damien_alomar <[email protected]> wrote:
> If you're going to be coding with GH you should at least download the
> dotNET SDK helpfile which has details on a large number of the
> functions within the Rhino SDK.  Its not 100% complete (all the
> functions are there, but not all are explained) and its not as
> "friendly" as the Rhinoscript one, but its way better than nothing.
>
> http://en.wiki.mcneel.com/default.aspx/McNeel/Rhino4DotNetPlugIns.html
>
> the first link in the Downloads section
>
> -Damien
>
> On Feb 15, 2:00 pm, Apologue <[email protected]> wrote:
>
> > Thanks David, it works now.  Is there anywhere where we can find out
> > information like this about the different functions?
>
> > Adam
>
> > On Feb 15, 5:52 pm, David Rutten <[email protected]> wrote:
>
> > > Hi Adam,
>
> > > the variable called 'points' in your script is of type List(Of
> > > On3dPoint). The function RhinoInterpCurve() requires that the points
> > > be supplied as an ArrayOn3dPoint.
>
> > > instead of:
>
> > > Dim points As New List( Of On3dPoint )
>
> > > use
>
> > > Dim points As New ArrayOn3dPoint()
>
> > > Then, instead of using:
>
> > > points.Add(myPoint)
>
> > > you use:
>
> > > points.Append(myPoint)
>
> > > And it should work fine.
>
> > > --
> > > David Rutten
> > > [email protected]
> > > Robert McNeel & Associates
>
> > > On Feb 15, 6:14 pm, Apologue <[email protected]> wrote:
>
> > > > Hi,
>
> > > > So I have this problem with a VB component that I made to sort a list
> > > > of points and create a number of interpolated curves through them.
> > > > This is the code in the component:
>
> > > > Sub RunScript(ByVal divNum As Integer, ByVal pts As List(Of
> > > > On3dPoint), ByVal linNum As Integer)
>
> > > >     Dim myCrv As New List(Of OnCurve)
> > > >     Dim i As Integer
> > > >     Dim j As Integer
>
> > > >     For i = 0 To divNum Step 1
> > > >       Dim points As New List( Of On3dPoint )
>
> > > >       For j = i To linNum Step (divNum + i)
> > > >         Dim myPoint As On3dPoint
> > > >         myPoint = pts(j)
> > > >         points.Add(myPoint)
>
> > > >       Next
> > > >       'Create a nurbs curve
> > > >       Dim crv As New OnNurbsCurve
> > > >       crv = RhUtil.RhinoInterpCurve(3, points, Nothing, Nothing, 0)
> > > >       If( crv.IsValid() ) Then
> > > >         'Set return vlue to list
> > > >         myCrv.Add(crv)
> > > >       End If
> > > >     Next
> > > >     A = myCrv
>
> > > >   End Sub
>
> > > > And this is the error message I get coming out of the component:
>
> > > > "Unable to cast object of type 'System.Collections.Generic.List'1
> > > > [RMA.OpenNurbs.On3dPoint) to type 'RMA.OpenNurbs.IArrayOn3dPoints'"
>
> > > > Any ideas?  I'm pretty new to scripting and have been racking my
> > > > brains trying to figure it out.
>
> > > > Thanks,
> > > > Adam

Reply via email to