Hi all,
Thanks in advance for any advice. I’m trying to build a find/replace for schedule filters. Here is what I have so far which does not come back with any errors and my final watch result seems correct. However, it is not making the actual change to the filter in revit… I must have missed something. Ideally i’d like to be able to run this for multiple schedules at the same time, but I’m just starting with one.
I might be wrong, but I think the OP needs that part of the graph to edit the value before it’s inputted?
My guess is that the input is currently a list containing a string… I would add a code block with x[0] and see if that helps… or @L1 to the ‘by parameter node’
The string replace is there because ideally I can use this for multiple schedules and changes all 1s to 2s or As to Bs. But even if I just use a string for the input, it doesnt change the filter at all.
Mark,
Thanks, i did try that just now with my fingers crossed, but still nothing. What really confuses me is that the output says the filter has been changed correctly. Im used to getting errors that help me figure out whats wrong, Im stumped when it says it worked…
Thanks! i knew there was a simpler way, sometimes i over think it too much.
Did this work for you? It works for me if Im creating a new filter, but still wont let me replace the existing filter text.
Well that sucks, I was really hoping to be able to just replace one number or letter in a bunch of schedule filters at once on a per project basis, vs opening each schedule and editing the filter. While your script does work for deleting and adding a new filter, Im not sure how much time it saves me. thank you for the input
I see. Maybe this one can save you a little more time
The idea is;
1 define the filter you wanna change
2 drop the old filter from list
3 create a new filter list which contains other filters and the new filter
4 clear all filters
5 add your new filter list
So I tried it your way, but a little simpler, just to clear all filters and then use the schedule filter by field, type and value node to add the new filter and I still get no error, yet no new filter added. It did actually remove the old one, though. So I thought my graph was faulty and tried it exactly the way you have above and I get a similar result. The old filter is removed, but no new one added. What am I missing here?