we had a script working in older version of dynamo 1.3.3
we recently migrated and facing this problem
in new we got these -1 values…
we are looking to get the following results in List.Map
basically we are trying to find which of the unique list 0 or 1 does each individual member of watch list match.
Can some one help me how to get the same list map as old one.
Any help is much appreciated!
Since I could not add image in previous question, I am attaching what we are expecting this to do.
Sorry if this has already been asked and resolved. I searched and did not find similar thread.
Looks like you should try and change the lacing on your “IndexOf” node, shortest should suffice.
It’s not very elegant, but here’s another option.
@KPRFramer another inelegant solution
Thank you for the quick reply. Yes even I thought it could be something similar, we tried all different variations of lacing on index of and unique items. But that did not work.
Yes! We did not try the work around. Thank you.
Thank you @Vikram_Subbaiah . Your replies in many posts have helped us in many bottleneck scripts and as usual simple and workable solutions. Again we did not try work around but this does help. We will use this for now, but I am still wondering how can this be resolved by using lists.
Notice that the element input of IndexOf in pre 2.0 versions of Dynamo is a variable rank object:
Where as the new version accepts only a singleton. This, just like the “Contains” node is another case where the replacement is inadequate… The 2.0 implementation is now identical to the “List.FirstIndexOf” node and is completely pointless.
Another way to synchronously compare all items in two lists is with a bit of python:
Like this maybe
indexOf.dyn (8.7 KB)