Find and Replaced Text string in schedule

Hello,

I have Schedule in my Revit model. which is not linked to any elements it is a individual.
Now Just wanted to find and replace for selected schedule table by using dynamo.
can anyone tell me whether is it possible or not ?

Thanks

I think it’s better to use excel rather than a dynamo. there are several free addons available for this task.

Yes You are right… but in my model there are existing 50+schedules… just want to replace specific text. from all the schedule.

Until you find a reason it isn’t, best to assume that it’s possible.

The question is where do you start building it?
Since your “schedules” have no link to any elements, the larger community know that you aren’t dealing with parameter values of individual elements which need to be edited. But also because you haven’t provided a data set we can’t tell how to go about solving your problem. We can make an assumption that it’s a “schedule” built by splitting the headers of a key schedule to make individual elements and not adding any keys. However those are usually (99% frequency) built via computationally driven importing of excel data. And if that is the case, then the question becomes “Why not delete that schedule and make a new one after editing your 50 excel documents?”

Assuming it was done this way, and there is some reason you can’t perform the action via the previous automation, you have to jump though a lot of hoops to make it happen.

  • Get the ViewSchedule element
  • Get the TableData from the ViewSchedule element
  • Get the relevant section of the TableData (perhaps heading, perhaps not) as a TableSectionData element.
  • Get the number of rows and columns in the TableSectionData element.
  • Iterate over the number of row/column combinations to perform the following:
    • Get the string stored in each cell.
    • Check the string for the string you want to swap out, if it’s not present move to the next row/column.
    • If the swap out string was present, edit the value to use the replacement string.
    • Set the cell object’s value and move onto the next row/column.

Give it a shot and see where you get, but be sure to provide a sample data set for others to use if youi’d like more direct support from the community. It takes a LOT of time and accurate guesswork to build up a dataset which mimics what you already have in front of you.