Page History: Units

Compare Page Revisions



« Older Revision - Back to Page History - Current Revision


Page Revision: 2014/06/30 22:56


SMath Studio can handle units; there's a large list of built-in units available for the most common applications that could be easily extended by the user.

Units are represented with an italic blue-colored font.

unit example



Insert a unit

To insert a unit, press the apostrophe (') and then digit the unit name; the placeholder shape will change and the dynamic assistance box can help you showing the built-in units (mouse pointer double-click or press the TAB key to insert the selected unit in the formula).

insert unit


Alternatively you can add a built-in unit by the units window (CTRL+W or menu "Insert" > "Unit..."), where you can easily find the unit by name or by family.

units window


Evaluating an expression that contain units, the output will be delivered with the default units (SI base units); to change the output unit, write your favorite unit in the right placeholder.

output unit


NOTE: the multiplication sign for units is hidden by default, so units like kN*m are shown kN m; to avoid errors the right way to type the unit is 'kN*'m, not 'kNm.


Custom units

You may define/override an unit inside the sheet (simplest way) or handling the Units.xml file (update).

units define


Units language

if you have not yet implemented localized units in your country leave a comment here: localization differences

From the menu "Tools" > "Options..." you can change the units language.

units language


The unit localization changes the way in which is written the unit of measurement.

units localization


Units description

Both built-in and custom unit description can be retrieved as a string using the description() function; description's language depends on Interface language.

units language


Known issues

to inform the developers about issues you found out use the forum: bugs&problems

Not all built-in functions work with units; to work with these functions divide the argument for the expected unit and multiply the result by the same unit.

built-in functions


The 0 value has no units. If you want a unit as output even when the result can be null, set the unit in the right placeholder.

null output


Be careful in handling relative and absolute temperature units; there's an open discussion here.

null output


History

  • SMath 0.87.3719 (Beta): first relase
  • SMath 0.88 (Stable): first stable relase
  • SMath 0.90 (Stable): translatable units implemented
  • SMath 0.97.5280 (Nightly build): Units.xml changes


See also



References

  • Introduction to SMath Studio 0.88 - page 15, PDF
  • Video examples of calculations with units for hydraulics (G.Urroz) - See Part 2 SMath Studio
  • Crib Sheet for SMath Studio 0.95 - PDF
  • Crib Sheet for SMath Studio 0.90 - PDF
  • Crib Sheet for SMath Studio 0.89 - PDF
  • Crib Sheet for SMath Studio 0.88 - PDF
  • Custom units examples - sm
  • Unit.xml editing - SMath forum

ScrewTurn Wiki version 2.0.37. Some of the icons created by FamFamFam.