algorithmic modeling for Rhino
Hi!
It is one of my first exercises in VB.NET. I'm trying to create a list of circles with different radius. I want to know what is wrong. Thanks!!!
Private Sub RunScript(ByVal Radius As List(Of Double), ByRef A As Object)
Dim ListCircles As New List (Of Rhino.Geometry.Circle)
For i As Integer = 0 To ListCircles.Count - 1
Dim Circle As New Rhino.Geometry.Circle(Radius)
ListCircles.add(Circle)
Next
A = ListCircles
End Sub
Tags:
For i As Integer = 0 To ListCircles.Count - 1
ListCircles has a length of zero when you start. You should use:
For i As Integer = 0 To Radius.Count - 1
--
David Rutten
david@mcneel.com
Thank You David!!!
Now...this is the translation error(BC30518):
Overload resolution failed because none of the 'New' functions that are accessed can be called with these arguments:
'Public Sub New (arc As Rhino.Geometry.Arc)': Value of type 'System.Collections.Generic.List (Of Double)' can not be converted to 'Rhino.Geometry.Arc'.
'Public Sub New (radius As Double)': Value of type 'System.Collections.Generic.List (Of Double)' can not be converted to 'Double'. (line 85)
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by