import clr
clr.AddReference('Soti.Connect.SemanticEngine.Conversions')

from Soti.Connect.SemanticEngine.Conversions import Converter

print("Loading MPXDotsToMm Converter")

class MPXDotsToMm(Converter):
    def Execute(self, args):
        if args == None or args[0] == None:
            return
        input_value = float(args[0])
        res = (input_value / 300) * 25.4
        return int(res)

plugin = MPXDotsToMm("MPXDotsToMm")

store.AddConverter(plugin)