I posted a sample in the tutorial page for future reference.
http://en.wiki.mcneel.com/default.aspx/McNeel/GrassHopperGallery.html


On Jan 7, 12:14 pm, tim <[email protected]> wrote:
> thanks for the help guys
>
> On Jan 7, 11:02 am, visose <[email protected]> wrote:
>
>
>
> > Hi,
> > You don't actually need scripting for this. There's a component called
> > 'mass addition' under scalar->util. Nevertheless, if you want to do it
> > by scripting i fixed the code for you:
>
> >     Dim total As Double
> >     For i As Integer = 0 To x.count - 1
> >       total = total + x(i)
> >     Next
> >     A = total
>
> > On Jan 6, 6:29 pm, tim <[email protected]> wrote:
>
> > > Is there a way to sum lists with the new programing components?
>
> > > here is what I am trying to do.
>
> > > I have a list of areas that I want to sum feeding them in as var x:
>
> > >   Sub RunScript(ByVal x As Object, ByVal y As Object)
> > >     ''' <your code>
> > >     Dim total As Double
> > >     Dim Area As New List(Of Object)
> > >     Dim i As Integer
>
> > >     For i = 0 To UBound(x)
> > >       total = total + x(i)
> > >     Next
> > >     Area.Add(total)
> > >     A = Area
> > >   End Sub
>
> > > I keep getting errors saying "can't cast system.double to
> > > system.array"
>
> > > any help much appreciated.- Hide quoted text -
>
> - Show quoted text -

Reply via email to