Appendix: Built-in Scripting Language Returned value Notes If you call this function more than once with different parameters for each call, then you can build a virtual table of format settings. You can set a different number of decimal places for each range of real numbers, and all of the settings are saved for the duration of runtime or until you reset the table using the ResetDecimalPointsTable function. Note: This formatting does not change the actual value of any tag or expression. It only changes how the value is displayed by on-screen objects.
Examples SetDisplayUnit Finds all tags and all Grid object and Trend Control object values that have a specific engineering unit (as stored in the Unit tag field), and then sets the DisplayUnit , UnitDiv , and UnitAdd fields on those tags. Syntax SetDisplayUnit( strUnitOrigin , strDisplayUnit , numDiv , numAdd ) strUnitOrigin The engineering unit to be matched. strDisplayUnit The new value for the DisplayUnit tag field. numDiv The new value for the UnitDiv tag field. numAdd The new value for the UnitAdd tag field. Returned value Notes This function only affects how the tag values are displayed on screen; it does not change the actual tag values in any way.
Page 544 InduSoft Web Studio 0 Error 1 Success Tag Name Expression Tag SetDecimalPoints( 1.5, 3 ) // Displays 3 decimal places for all real numbers greater than or equal to 1.5. Tag SetDecimalPoints( #3, 1 ) // Displays 1 decimal place for all real numbers less than or equal to −3. Function Group Execution Windows Embedded Thin Client SetDisplayUni t Graphic Synchronous Supported Supported Supported 0 Success. -1 Wrong number of parameters. -2 strUnitOrigin parameter is empty. -3 numDiv parameter is invalid (equal to 0).