IEnumerable is an interface that is implemented by pretty much every collection type class. Arrays, Lists, Dictionaries, ConcurrentBags, HashSets… you name it. If a class is designed to store a bunch of values it probably implements IEnumerable.
The reason for this is that IEnumerable allows you to easily loop over the values in a collection without knowing how many there are, and without the values having a specific defined order. This means using a foreach loop or whatever the Python equivalent is.
If you have an IEnumerable, all you can really do is foreach your way through that collection.
Thank you for your responses.
Unfortunately, I get nuts from the real script I am working on (with custom functions).
Do you know what you know what the following means?
Runtime error (InvalidCastException): Error in IEnumeratorOfTWrapper.Current. Could not cast: Rhino.Geometry.Point3d in System.Guid
Traceback:
line 45, in script
MyMethods.py (1.6 KB)
Python-file MyMethods must be added to the folder C:\Users\NameUser\AppData\Roaming\McNeel\Rhinoceros\6.0\scripts.
It is called MyMethods.py