I recently started making a script that will take a door schedule (Bumblebee package) and add a few additional parameters to the output before exporting to excel (Element ID, GUID, Ironmongery etc).
I’ve tested this in isolation with 3 door families and it worked as expected, however, when testing on a project I ran into a issue. I have a few different door families from different sources and my initial way of filtering only applied to our in-house doors, not the other family types downloaded/created etc.
I’ve been trying to find away to use the Revit schedule (door mark) to filter the list of doors in the project. I’ve tried a few ways and searched a bit but none of the obvious suggestions worked and I can’t figure out why.
I’d like to take the longer list of all door instances and compare it against the shorter one from the Revit schedule, then remove those doors which do not appear in the door schedule. The remaining doors I will match up the Mark numbers of the schedule with those in the project and use this to add additional parameters (I have this part working separately). In the example I have to get the 400oo down to 25. What I’ve noticed in excel is that the blank rows in the schedule are being populated with random (shared nested) doors from the project.
Try something like this, see what you get. (I’m kinda just throwing this together, so I don’t know if will work for certain on your specific task)
You may not need the “String From Object” if your lists are already strings, my test was using integers so I had to convert them to strings to use the String.Contains node.
I’m not sure whats going on but I think there might be something missing? The list.contains has 400+ lists (for each door) of each item checked against the schedule list.
It looks like its working to me. That output list is now a list of all the doors in the job filtered by the list of doors in the schedule filtered by whatever index 2 is in the schedule (mark?). You filtered the 430 doors down to a list of 141 doors that match that mark of doors in the schedule.
Did I misinterpret your intentions?
Actually, I don’t think its working. Because the sting.contains node is giving you more true values than you need. For example, one of your schedule values is D0.01.1, if you check any value that contains that string it will report back true. So if you have a door that is D0.01.10 it will report true because even though it is a different number, the first 8 characters are the same so it technically “contains” the first number. We need a better way to filter.
I’m trying to the total number of doors in the project (which could be any number due to shared nested door families) down to only those which appear in the schedule using Schedule.GetData list at index 2 (25 doors incl a few blank lines).
I think it’s almost there, I was trying to use a node to give the door list an index, this returned “-1” for those not listed, I’m not sure how to proceed from there or if it’s a good way to go?
If you want to remove the blank values coming out of the schedule you can use a List.filter to look for blank strings ( “” ) or try a list.clean. List.clean can preserve the indices if you want.