Get specific item from list

Hello everyone, I am currently trying to automate NWC Exports with this script. It seems to be working fine the only issue is that I have to select “index” number and I was wondering if there was a way I could just type in the view specific name so that it could just select that view without having to find the number.

For example finding “3D_NWC EXPORT” in the list and being able to use that as my index?

Not sure if there’s anything I could do with that but please let me know, I’ve been trying to find something with no luck. Thank you!

If you are consistently looking for a the same or similar name on the view you could use a string contains node to search the specific name you want. you might use a list.first item to make sure you only get just one item when you are searching. hope this helps.

1 Like

Absolutely. You would just have to compare the specified view name with the list of returned view names. You can either use a boolean mask to filter out the one view you need or compare indices and get the view with the specified index.

1 Like


Nick, thank you for the quick reply. I tried doing something like this. Im assuming I did not attach the right string to the “string.contains” node because everything comes up as null.

Let me know if you have any suggestions, thank you!

You have to compare it against another string - in this case, the view names. String.Contains returns a boolean, not an index, so you would use FilterByBoolMask to filter the view elements that way.

1 Like

Am i plugging in the right components?

FilterByBoolMask filters elements based on a list of true/false values. You could use String.Contains, but == would be better. You would still have to compare against the view name (Element.Name) not just the view. Try looking for examples of FilterByBoolMask in the forum. It’s a very common workflow.