Grasshopper

algorithmic modeling for Rhino

Very urgent!!!!the problem of index out of range

how to solve the this problem when the warning is inside the component?

"1. Solution exception: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index"


how to solve the " Index was out of range"?
could you give e the answer?

1. Solution exception:Index was out of range. Must be non-negative and less than the size of the collection.Parameter name: index

Views: 9671

Replies to This Discussion

x and y are the parameters name  by default on the script components.. If you change the name of the input, you must replace the parameter name inside the script. And, x is a list(of object) and y an integer. You did not give details about where the error is, so the answer will be generic.

do i need to add the above script inside to your vb component or the above script is originally here inside your vb component?

IdxOutRange.gh,

Dude, this is much easier.
Upload your file, or at least the part that gives error with corresponding data (the gh file must works).
You've asked a general question, so the answer will be generic.
If you want a solution to your particular problem, let us know your definition.
If you do not know how to solve this basic problem, not go into scripting, your problem should be very simple using gh components.

but i dont know how to use the gh component to solve this problem actually.

The code that I sent is the optimal method for use in a custom component. I thought you were working from code, if not it will not be useful. Sorry if I confused you.

The component that gives you an error do not know him, must belong to a plugin. Maybe your problem is an error of branches / lists, but must be a simple problem to solve if you know what's happening in your definition. I can not know, if you do not explain your definition better.

could i message you in private?

the code have all error after i copy this directly to vb component.

See the file men, relax xD


how can solve this after using your script?

You are using number data instead point data in the first input...

I put the range component as an example of data collection.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service