18.01.2015 Views

Technical Reference Manual - InduSoft

Technical Reference Manual - InduSoft

Technical Reference Manual - InduSoft

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Appendix: Built-in Scripting Language<br />

Graphic functions<br />

These functions are used to manipulate and print project screens.<br />

AutoFormat<br />

Automatically formats a real number to a preset number of decimal places, according to the virtual table of<br />

settings created by the SetDecimalPoints function. (This is similar to the Format function, except that you<br />

do not need to specify the number of decimal places.)<br />

Function Group Execution Windows Embedded Thin Client<br />

AutoFormat Graphic Synchronous Supported Supported Supported<br />

Syntax<br />

AutoFormat(numValue)<br />

numValue<br />

The real number to be formatted.<br />

Returned value<br />

This function returns a formatted string.<br />

Examples<br />

In the following examples, the SetDecimalPoints function has already been used to set 3 decimal places for<br />

values greater than equal to 1.5 and 1 decimal place for values less than or equal to −3.<br />

Tag Name<br />

Expression<br />

Tag AutoFormat( 1.543210 ) // Returned value = "1.543"<br />

Tag<br />

GetScrInfo<br />

AutoFormat( −3.123456 ) // Returned value = "−3.1"<br />

Retrieves information from the project about an open screen.<br />

Function Group Execution Windows Embedded Thin Client<br />

GetScrInfo Graphic Synchronous Supported Supported Supported<br />

Syntax<br />

GetScrInfo( strScreenName, "tagResult", optNumResultType, optNumID )<br />

strScreenName<br />

tagResult<br />

The name of the screen for which information is required.<br />

The name of the tag that will receive the information retrieved by the function. This name must<br />

be enclosed in quotes, or the project will try to get the contents of the tag.<br />

optNumResultType<br />

A numeric flag specifying the type of information to be retrieved by the function:<br />

<strong>InduSoft</strong> Web Studio Page 645

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!