I am now trying to create a simple auto correct mechanism for the text notes category. Right now I am doing it with consecutive string replace nodes (as in the attached), but I am going to end up with too many nodes that way, because eventually the checklist will grow a lot.
How can I simplify the graph?
Hello Julian, a solution would be to create two lists:
-one list with the words you want to correct
-one list with the cerrect words
then switch the lacing of your string.replace node to “longest”. It should do the job and help you keep a reasonably sized script.
Hope it helps
Where do you get the text? How big will it be? Maybe better to use Python?
thanks, longest lacing will do fine
I’ve got a few suggestions for your work-flow. As we know, Revit already has a built in text spell checker. However it doesn’t support all languages and does not provide a lot of options for customization. With Dynamo, we can select every text note element, extract its content and send it to excel. You’d think that excel would have auto-correct, but for some reason it doesn’t. Luckily there are alternatives like Libre Office:
LO Calc can open excel files, has auto-correct and has dictionaries for pretty much any language. So we could export the data to excel with Dynamo, open it in LO Calc, correct it, re-import it with Dynamo and then overwrite the text notes. Here’s an example workflow:
Exporting the data from Revit:
Correcting the data:
Importing the data back into Revit:
Dimitar, this is awesome. Can we compare the current words/text notes in the project against a dictionary directly in Dynamo? I hope you are going to be at RTCNA so we can finally meet.
Yes, that shouldn’t be a problem. You’ll have to merge the two example graphs shown above into one. Ping me if you need help with that.
I won’t be able to go to this year’s RTCNA event, I’ll try to show up for the one next year
Dimitar, Thanks and that’s too bad. Another time.