Is there a way to make the script that searches through a sequence of “strings” and replaces them with a similar sequence? I’m trying to remove spaces after a number with a decimal point (project wide)
For instance: I current have “1. 8mm” and would like to change to “1.8mm”
Search for “. 1” replace with “.1”
Search for". 2" replace with “.2”
Search for". 3" replace with “.3”
Search for". 4" replace with “.4”
Search for". 5" replace with “.5”
Search for". 6" replace with “.6”
Search for". 7" replace with “.7”
Search for". 8" replace with “.8”
Search for". 9" replace with “.9”
Thanks in advance Dynamo guru’s!
This is what I currently have…but is only good for one set of string variables
Warning: TextNote.SetText operation failed.
The input argument “text” of function Autodesk::Revit::Proxy::DB::TextElementProxy::Text::set or one item in the collection is null at line 214 of file d:\ship\2018_px64\source\detail\detaildbapi\gensrc\APITextElementProxy.cpp.
Parameter name: text
I just ran another test and it does not work if there is more than one period in the text string. I do not have time to figure it our right now.
If you are new what I did is a good learning opportunity for following data. You do not need to use it but it could help to look it over. All I did was remove all strings that did not have a number before the period and after the space. This figures out what is a period and a decimals. Feel free to PM me with any questions.
I think @Ashton_at_Hierarchy is using this on a whole file. Doing what you did will remove the space at then of a sentence in addition to the space after the decimal.
Thanks for the input team, I think Steven is correct, we needed a way to limit it’s use, and the code above with string.replacemultiple was ideal for my specific purpose.