Here is a set of three utility functions I use when debugging my InDesign scripts, to ensure that they work correctly in environments with different measurement units (points, millimeters, etc.) and ruler origins.
If you haven’t already, read why managing measurement units is important.
Use this to display a quick
alert of what the current settings are.
From pixels to points to ciceros, InDesign allows users to pick from 15 different measurement units to use in various places of their documents. Thanks to this versatility, it can sometimes be hard to predict how a script will act in a measurement unit environment even slightly different from yours.
Where are these measurement units?
There are three major places where measurement units could vary depending on the user environment: