Grasshopper

algorithmic modeling for Rhino

What does this mean?

 

{0;0}
0. Error: Value of type '1-dimensional array of Integer' cannot be converted to 'Integer'. (line 95)
1. Error: Value of type '1-dimensional array of Integer' cannot be converted to 'Integer'. (line 96)

 

Brain pain...

 

Thanks.

Views: 624

Attachments:

Replies to This Discussion

You've made p() an array, so when you are trying to do something with G(p), it's breaking...

Hi David, thanks for a quick response. Do you have any recommend reference I can learn about this array? Or teach me how to fix? I look through grasshopper primer and rhino script but nothing better than a good example!! ^^

From your code it's hard for me to understand what you want to do....if you were more specific about what you are trying to achieve it would be easier for me to help you.  An array really is nothing more than a list.  There's tons of documentation about it on any number of vb.net support sites.

This is my question.

I don't know how to explain this random number recursion?? maybe...

but pretty straight foward if you see diagram.

I Really appreciate your help!!!

 

Hi,

I had a little go at what you wanted. Is this what you're looking for?

Attachments:

Very interesting! You are correct!

This is the result I want.

Unfortunately I am very no knowledge of C#.

I guess I can try rewriting as VB# for the sake of a personal preference.

(and it may take several days...)

If you have any VB# version of this that would be fantastic.

Thanks!

Here is the code in both VB and C#

Attachments:

Thanks Ernst.

BTW I have error note like this

 

Warning: Variable declaration without an 'As' clause; type of Object assumed. (line 98)
Warning: Variable declaration without an 'As' clause; type of Object assumed. (line 100)
Error: Value of type 'T' cannot be converted to 'Double'. (line 110)
Error: Value of type 'T' cannot be converted to 'Double'. (line 112)

 

and I can't find any 'T' in script.

 

I really appreciate your help!!

I did not specifically define the variables results and counter by there type. It's a while since I programmed VB. Please add the text like this to the lines 98 and 100:

 

Dim results As List(Of Double) = New List(Of Double)

Dim length As Integer = 0

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service