Using the Tab Style Page Templates > Creating a New Project > Using Environment Variables in Tab Style Templates

Using Environment Variables in Tab Style Templates

Whereas parameters apply specified rules to every template page, environment variables apply rules to specific pages. In this way, you can use environment variables to specify functionality for specific pages.

For example, to display a specific page, you'd specify the page name as the environment variable. To call a specific Cicode function, you'd specify the function name (with a "?" prefix), space, then a list of comma separated arguments, like this: ?WinPrint LPT1,0,0,Trend.pal. (The "?" indicates that the variable is to be interpreted as a function call rather than a page to display.)

Let's look at a more detailed example: usually the standard Print button is used for printing a graphics page in WYSIWYG format. If you have a text/html file displayed on the page, or perhaps a trend, you can create your own print function (for example, PrintTrend) and specify it in the environment variable, as ?PrintTrend. To reduce the amount of ink used, specify the WinPrint function with a user-defined palette. In this case you would specify it as a parameter rather than as an environment variable so that it applies to every page.

Note: For pages created based on the Process Analyst templates, you can print the screen using the standard Print button, or print the chart using the Print button on the toolbar of the Process Analyst object. Give the user both alternatives as they both serve different purposes.