Exact Matches - Element.FilterbyName

Hi - I am trying to create a new schedule within Revit using the below script. The issue I am currently having is that, it isn’t exactly matching the field names within my Code Block, and is adding any fields which slightly relate to the field names I am inputting. For example item 6 on the Code Block is “Bham_Floor” the schedule is showing this field, along with 3 others - Any items how I can get exact matches only?


image

Hi @m.hoper9DMVY ,

See if an approach like this helps:

1 Like

== and a BoolMask node might help. Could be condensed relatively easily into some designscript if preferred.

You could also edit your own version of that Clockwork node. Inside it uses String.Contains, you could modify this to instead be == similar to above.

1 Like

Thanks for this - I changed the node itself to include == at it’s worked!

Hi @m.hoper9DMVY ,

Just FYI, if that node is from a package, i.e. Clockwork, your edits WON’T change for others when using the same script, the node (.dyf-file) is only changed on your end.

2 Likes