Notifications
Clear all
[Closed] wildcard on variable?
Aug 04, 2011 11:36 pm
Hi!
I am trying to create a collection from an array. This doesn’t work.
myarr = #("steel_001", "ground_001", "person_001")
currentLayer = for o in objects where matchpattern o.name pattern:myarr[1]* collect o
How can I place a wildcard on an array value?
Thanks!
Dave
2 Replies
Aug 04, 2011 11:36 pm
pattern: needs a string, just a * without quotes is the multiplication operator
myarr = #("steel_001", "ground_001", "person_001")
currentLayer = for o in objects where matchpattern o.name pattern:(myarr[1]+"*") collect o