In the various standard report and label templates, PC-DMIS uses several reporting expressions to display different pieces of information or to format the display of information. For example, consider the code behind feature.lbl, a standard label template that ships with PC-DMIS.
In this template, there are several reporting expressions (=LOADSTR, =DIM_MEASURED, =NOMINAL and so on) that determine what information PC-DMIS should display in the cells.
Common Expressions
The following list describes the most common expressions used in the various standard templates:
Some of these functions are also discussed in the "Functions and Operators" topic.
=<Expression>:N - This expression allows you to display repeated information. See "Using a Type Index to Display Specific Data" and "Predefined Constants" for more information on repeating rows.
=AXIS - This expression displays the current axis name (XAXIS, YAXIS, or ZAXIS).
=DEVIATION_ANGLE - This expression displays a decimal value that represents the deviation angle in degrees of a Position dimension. PC-DMIS uses this value to draw the radial graphic for the Position dimension templates.
=DEVPERCENT_NOM - This expression displays a decimal value that represents the percentage of the total tolerance range that marks the 0 deviation (nominal) position on the linear graphic. For a bilateral tolerance where the +/- values are equal, this value would be 50.0 (percent); the center of linear graphic represents 0 deviation. For a non-bilateral tolerance, this value would be 0.0; the leftmost side of linear graphic represents 0 deviation.
=DEVPERCENT2 - When you set USETWODEVIATIONS to TRUE (see USETWODEVIATIONS below), this expression displays a decimal value representing the percentage of the + tolerance used by the max deviation of a bilateral profile reported as form and location. The percentage of the – tolerance used by the min deviation is given by DIM_RPT_DEVPERCENT.
=DIM_DEVIATION - This expression displays how much a dimension deviates from the nominal.
=DIM_OUTTOL - This expression displays the out of tolerance value for a dimension.
=DIM_MAX - This expression displays the maximum value for the given axis among all points related to the input feature.
=DIM_MEASURED - This expression displays a dimension's measured value.
=DIM_MIN - This expression displays the minimum value for the given axis among all points related to the input feature.
=DIM_RPT_DEVPERCENT - This expression displays a decimal value representing the percentage of the total tolerance range that marks the deviation of this dimension.
=DIM_RPT_GRAPHIC - This expression displays an integer value representing the type of graphic control PC-DMIS should display for the dimension.
0 - Report no graphic control.
1 - Report the linear graphic control.
2 - Report the radial graphic control.
=DIM_RPT_ISBILATERAL - This expression determines whether or not the linear graphic represents a bilateral tolerance (+/- tolerance value) such as the size of a hole or profile reported as form and location. Examples of tolerances that are not bilateral (single tolerance value) are form tolerances such as circularity, flatness, straightness, and profile reported as form only. The value can be "0" (FALSE) or "1" (TRUE).
=DIM_RPT_NUMZONES - This expression displays a decimal value indicating the number of tolerance zones (from 0 deviation to the maximum allowed deviation) to be drawn on the linear graphic. You can set this in the Edit Dimension Colors dialog box (select Edit | Graphic Display Window | Dimension Colors). You can assign each zone a unique color to show by the color of the linear graphic how much of the tolerance was used by the deviation of the dimension.
=F_PLUS_TOL - This expression displays a feature's plus tolerance.
=F_MINUS_TOL - This expression displays a feature's minus tolerance.
=ID - This expression displays the feature or dimension ID.
=LOADSTR - This expression loads a string from a table of stored strings within PC-DMIS. See "Loading Strings from PC-DMIS" for more information.
=NOMINAL - This expression displays the nominal data for a feature.
=Page() - This expression displays the current page number of the Report window.
=Pages() - This expression displays the total number of pages of the Report window.
=TOL - This function colors any text or expressions.
=UNIT_TYPE - This expression displays the unit of measurement for the feature or dimension.
=USETWODEVIATIONS - This expression determines whether or not the legacy dimension label template's linear graphic uses two deviation values. A bilateral profile reported as form and location displays how much of the + tolerance was used by the max deviation and how much of the – tolerance was used by the min deviation. The value can be "0" (FALSE) or "1" (TRUE).
Combined Expressions
You can also combine expressions or use them together with other expressions, as shown in this code string taken from the Legacy_Dimension_Cad.lbl label template:
=TOL(DIM_DEVIATION:N,DIM_OUTTOL:N,0.0,0.0)
This uses the =TOL function to display the dimension's deviation value and give it the Error color (usually red).
You can find another example in the standard report templates in PC-DMIS versions 4.2 and higher. The Text object at the bottom of those templates uses this combined expression in the Text property to display the current page number along with the total number of pages:
=page() + " Of " + pages()
Page six of a 10-page report would read as follows at the bottom of the page in the Report window:
6 Of 10