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

from Soti.Connect.SemanticEngine.Conversions import Converter

print("Loading MmtoMPXDots Converter")

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

plugin = MmtoMPXDots("MmtoMPXDots")

store.AddConverter(plugin)