Change View Template Names and Scales

Hi all,
I am getting stuck with the String.Replace Node and not really sure why.
I am trying to use Dynamo to convert an Imperial Template to a Metric one.
There are some name in the View Template I would like to change, for example : Architectural Plan_1/4" to be Architectural Plan_1/50. At the same time, I also want to round up the Scale from 48 to 50.

I am pull out the view templates using Archilab packages, then use String.Replace to replace 1/4" to 1/50 then use Element.Setname from Clockworks, but somehow it did not work.
Also not sure how to change the scale to match the View Template ?

Help please !

Thanks.
Ngoc

Hi @nnguyen,
Welcome to the Dynamo Community.

Try using String.ReplaceMultiple from Clockwork package

Thanks Amol. I did tried it before. Did not work. What version of Dynamo/ Clockworks you are using ?
I am on dynamo 2.0.3 and Clockwork 2.3

I’m using the same versions as well.
image

If that didn’t work, try this Python approach:

def toList(item):
	if isinstance(item, list):
		return item
	else:
		return [item]
		
out = []

strings = toList(IN[0])
searchList = toList(IN[1])
replaceList = toList(IN[2])

if len(searchList) == len(replaceList):
	for string in strings:
		flag = True
		for search,replace in zip(searchList,replaceList):
			if search in string:
				newString = string.replace(search,replace)
				flag = False
				out.append(newString)
				break
		if flag:
			out.append(string)
else:
	out = "Search & Replace List lengths don't match"

OUT = out