Also, if you are dealing with model units then make sure to convert to Length
and then rely on Length.to_s
to convert the unit into the formatting of the current model.
http://www.sketchup.com/intl/en/developer/docs/ourdoc/length#to_s
For more information on dealing with units in SketchUp: Dealing with Units in SketchUp | Procrastinators Revolt!