Open j-meds opened 2 years ago
The node itself does not do fuzzy searching. That is just how I find the filter method:
So if a user types in StratsWith
, I can use Fuzzy Search to find the closest match which would be StartsWith
@johnpierson Possible to support multiple strings in the value ? For example I need to get elements that contain "Door" and "Window".
That might be possible. I will have to take a look when I have a chance.
@johnpierson Okay please do let me know, if you don't have enough time I can create a PR for it as well. I believe the changes would be in this file ? https://github.com/johnpierson/RhythmForDynamo/blob/master/src/Rhythm/Revit/ElementFilter/ElementFilter.cs
Yep! That is where the change would be. The biggest thing to consider (and probably the majority of the time) would be for it to work with all list structures.
That being said, it is already doable with list management. (Also if you are looking to filter by category, then the ElementFilter.ByName node is not the correct one to use. But if those values were in the name. then cool)
@johnpierson Doesn't seem to work in my case. It just fetches back one "Door Schedule"
When I use the regular string it works perfectly. Could it be a bug?
updated images
What does the list structure that you are putting in the elements input look like? That can cause hiccups if it is nested.
@johnpierson I'm opening 3 files and fetching their schedules. I get a list of 3 element list,
I don't want to flatten because I need to keep separate, it's odd it works fine with the string.
it's odd it works fine with the string.
Not really. because that is a single item. The other demonstration is a list. Very different when it comes to how dynamo handles it.
If you want this fixed right away, I suggest getting the name yourself with Element.Name and use Clockwork's node called String.ContainsMultiple.
I will try to check it out more in the future, but as of right now, I don't have a lot of time to investigate.
@johnpierson I really appreciate you helping me, It seems that clockwork node doesn't exist anymore and their regex doesn't work with a list that contains multiple list. I went ahead and implemented a python script that merges 2d list as I'm only searching for two keywords. Anyways it would be awesome for multiple strings by using a comma delimited string.
list_1 = IN[0]
list_2 = IN[0]
# Place your code below this line
def Merge2dList(lst1,lst2):
MergedList=[]
for index,val in enumerate(lst1):
print(lst1[index])
MergedList.append(lst1[index] + lst2[index])
return MergedList
# Assign your output to the OUT variable.
OUT=Merge2dList(IN[0],IN[1])
Summary also needs updating as it says it supports "fuzzy searching". For example passing in a list or comma delimited string.