Dynamo Multiple If Then statement pipe size

I am trying to create a script that will search for Pipes / Pipe Fittings / Pipe Accessories Sizes and convert those sizes to Metric in a New Parameter. For example if the Pipe size is 1/2" new parameter is 20MM, if Pipe Fitting Size is 2"x4", the new parameter reads 63MMx90MM. I don’t want to convert it all to Metric just have a New Parameter that converts the Size to Metric for a specific system. Thank you.

A dictionnary would do the job