SketchUp extends the Ruby Numeric class with methods for units conversion. Among these are ones that inform the Ruby interpreter that a numeric value in your code is to be taken to have particular units. For example,
r = 5.m
converts the value 5 in meters into the equivalent internal inches (196.8503937007874) that SketchUp always uses for lengths.
In case that I don’t have a particular unit but I want them to change along each template, like I want to have 5 as radius but in mm template they will create 5.mm, in m template they will create 5 m. Does it have any possible ways to do that?
to retrieve unit and check what it is then change the number afterward but is there any way which more efficient than this idea since it have to check on every single numbers I have to create all the time.