// UnitValue tests // reset preferences before you start var exampleToRun = 1; if ( exampleToRun == 1 ) { // 1) documents.add( 1000, 1000 ); } else if ( exampleToRun == 2 ) { // 2) app.preferences.rulerUnits = Units.PIXELS; documents.add( 1000, 1000 ); } else if ( exampleToRun == 3 ) { // 3) app.preferences.rulerUnits = Units.INCHES; documents.add( UnitValue(1000, "px"), UnitValue(1000, "px") ); } else { alert( 'bad exampleToRun ' + exampleToRun ); }