24 - Reporting Measurement Results

Download as pdf or txt
Download as pdf or txt
You are on page 1of 388

Table of Contents

Reporting Measurement Results ..................................................................................... 1

Reporting Measurement Results: Overview ................................................................ 1

Reporting Tutorials ...................................................................................................... 2

Working with Legacy (HyperView) Reports ................................................................. 3

Migrating Legacy (HyperView) Reports.................................................................... 3

Using Legacy (HyperView) Reporting ...................................................................... 4

Report Generation Sequence ...................................................................................... 4

About the Report Window ............................................................................................ 6

Reporting Toolbar .................................................................................................... 8

Working with the Preview Pane.............................................................................. 15

Using Tooltips in the Report Window ..................................................................... 17

Changing the Report Window's Contents............................................................... 18

Using Standard Reports ............................................................................................ 30

Viewing a Legacy Text Report ................................................................................... 35

Reported Tolerance Zones for Form Dimensions ...................................................... 36

Rearranging Report Pages ........................................................................................ 38

Modifying Standard Templates .................................................................................. 39

Using .DAT Files in Generated Reports..................................................................... 40

Modifying the Report's Header .................................................................................. 41

Changing the Report's Text Colors ............................................................................ 44

Adding Notes to a Report .......................................................................................... 45

About the Reporting and Form Editors ...................................................................... 49

i
Table of Contents

Menu Bar for the Form and Reporting Editors........................................................ 49

The Font Bar .......................................................................................................... 53

The Object Bar ....................................................................................................... 54

The Layout Bar..................................................................................................... 160

About Object Properties ....................................................................................... 168

Understanding the Report Template Editor .......................................................... 193

About the Label Template Editor .......................................................................... 196

About the Custom Report Editor .......................................................................... 198

Understanding the Form Editor ............................................................................ 199

Creating Templates ................................................................................................. 201

About Reports and Report Templates .................................................................. 201

About Labels and Label Templates ...................................................................... 216

About the Rule Tree Editor................................................................................... 230

Changing a Template's Preview Thumbnail Icon ................................................. 243

Saving a Template or Form to an Earlier Version ................................................ 244

Tutorial - Customizing a Report Template............................................................ 245

Creating Forms ........................................................................................................ 251

Understanding the Form Editor ............................................................................ 252

Object Sheet ........................................................................................................ 253

Tutorial - Creating Forms ..................................................................................... 254

Using Forms with Reports .................................................................................... 265

Creating Custom Reports ........................................................................................ 266

About the Custom Report Editor .......................................................................... 267

ii
Reporting Measurement Results: Overview

Tutorial - Creating a Custom Report .................................................................... 269

Custom Report Generation .................................................................................. 278

Positioning Report Objects................................................................................... 279

Dragging and Dropping Information into a Custom Report .................................. 281

Using Rules .......................................................................................................... 289

Working with Multiple Pages ................................................................................ 289

Viewing and Printing Custom Reports.................................................................. 290

Editing or Deleting Custom Reports ..................................................................... 291

Using a Custom Report from another Measurement Routine............................... 292

About Report Expressions ....................................................................................... 292

Functions and Operators...................................................................................... 293

Some Reporting Expressions Examples .............................................................. 308

Using Data Types to Find a Report Expression ................................................... 318

Expressions Used in Standard Templates ........................................................... 365

Using PC-DMIS ActiveX Controls ............................................................................ 368

Adding an ActiveX Control ................................................................................... 368

Passing Information to an ActiveX Control ........................................................... 369

Some PC-DMIS ActiveX Controls ........................................................................ 370

Tutorial - Using Scripting to Enhance your Report ................................................... 374

Summary of Tutorial Steps................................................................................... 375

Things to Know .................................................................................................... 376

Step 1: Copy CADONLY.RTP to CADONLYREF_ID.RTP ................................... 377

Step 2: Copy REFERENCE_ID.LBL to REFERENCE_ID_COLOR.LBL .............. 377

iii
Table of Contents

Step 3: Add VB Script to REFERENCE_ID_COLOR.LBL .................................... 378

Step 4: Import the CAD2.RUL rules into CADONLYREF_ID.RTP ....................... 380

Step 5: Add VB Script Code to CADONLYREF_ID.RTP ...................................... 381

Step 6: Modify the Rules to Use the VB Script Code for Remaining Dimensions 383

Step 7: Test CADONLYREF_ID.RTP in the Report Window ............................... 383

iv
Reporting Measurement
Results
Reporting Measurement Results:
Overview

For tutorials in your language, please contact your regional office or


headquarters.

After you measure your part, it's important to be able to communicate your
measurement results with others. PC-DMIS, by default, sends your measurement data
to a standard textual report, called an inspection report. It includes comprehensive data
about each feature measured by your measurement routine. You can send this report to
the printer or to a file and later view stored reports by selecting View | Inspection
Report. See "Viewing an Inspection Report" and "Printing the Report Window".

For many tasks, the standard inspection report may be exactly what you need.
However, PC-DMIS also gives you some powerful tools to generate your own
interactive reports. With these tools, you can use templates to determine exactly how
your reports look and what information gets included in them. Also, with these
templates, you can maintain a consistent look and feel across several reports.

In addition, you have the option to create reports for specific measurement routines
called "Custom Reports". This is a useful solution when your reporting needs don't
require the use of report templates.

This chapter covers the following main topics:

• Reporting Tutorials
• Working with Legacy (HyperView) Reports
• Report Generation Sequence
• About the Report Window
• Using Standard Reports
• Viewing a Legacy Text Report
• Reported Tolerance Zones for Form Dimensions
• Rearranging Report Pages

1
Reporting Measurement Results

• Modifying Standard Templates


• Using .DAT Files in Generated Reports
• Modifying the Report's Header
• Changing the Report's Text Colors
• Adding Notes to a Report
• About the Reporting and Form Editors
• Creating Templates
• Creating Forms
• Creating Custom Reports
• About Report Expressions
• Using PC-DMIS ActiveX Controls
• Tutorial - Using Scripting to Enhance your Report

Reporting Tutorials
This topic provides a list of available reporting tutorials. If you are new to the template-
based reporting functionality that PC-DMIS uses, you should go through these tutorials
in order to better understand how reporting is currently handled.

The tutorials below are displayed in the order that they appear in the overall
documentation structure of the "Reporting Measurement Results" chapter. You may
want to go through this chapter from the beginning to understand how the
documentation topics are structured contextually.

• Tutorial - Creating a Report Template (Under the "Creating Templates" main


topic)
• Tutorial - Creating Label Templates (Under the "Creating Templates" main topic)
• Tutorial - Customizing a Report Template (Under the "About Reports and Report
Templates" main topic)
• Tutorial - Creating Forms (Under the "Creating Forms" main topic)
• Tutorial - Creating a Custom Report (Under the "Creating Custom Reports" main
topic)

Additionally, you may find these other main reporting topics and procedures useful:

• Modifying Standard Templates


• Modifying the Report's Header
• Viewing a Legacy Text Only Report
• Changing the Report Window's Contents

2
Working with Legacy (HyperView) Reports

Working with Legacy (HyperView)


Reports
Legacy reporting (formerly known as HyperView reporting) existed in older 3.x versions
of PC-DMIS. It provided the basis for the newer template and form and reporting
environments used in 4.x and later versions.

By default PC-DMIS will use the newer template approach to reporting. What does this
mean for those of you with legacy Hyper Reports? PC-DMIS provides the ability for you
to:

• Migrate your HyperView reports into either a custom report or a form. See
"Migrating Legacy (HyperView) Reports".
• Continue working directly with your HyperView Reports. You can create and edit
reports. See "Using Legacy (HyperView) Reporting".

Migrating Legacy (HyperView) Reports


While you can now create and edit HyperView reports in version 4.3 MR1 and later, you
may want to migrate your legacy HyperView reports into PC-DMIS's new reporting
environment so that you can work with them there instead.

To convert an existing HyperView report:

1. Select File | Reporting | Edit | Legacy Report to open the HyperView report.
The report will open in run mode.
2. Select File | Convert To and then select either Report or Form.

• If you select Report, PC-DMIS will convert your HyperView report to work
with the Custom Report Editor. However, all objects may not be
converted. Only objects supported by custom reporting will be converted.
See "Creating Custom Reports".
• If you select Form, PC-DMIS will convert your HyperView report to work
with the Forms Editor. However, all objects may not be converted. Only
objects supported in Forms will be converted. See "Creating Forms".

You can then modify the report or form in the appropriate editor. The original HyperView
report remains untouched.

3
Reporting Measurement Results

Be aware that certain objects that used to appear in the HyperView Report
Editor may not be supported by your selected migration route. For example, if your
HyperView report contains button objects, and you migrate them into the Custom
Report Editor, the buttons will appear in the editor, but they will not function in the
Report window.

Using Legacy (HyperView) Reporting


Now, in version 4.3 MR1 and later, PC-DMIS again supports the creation and editing of
HyperView reports.

• To create a new legacy report, select File | Reporting | New | Legacy Report.
• To edit an existing legacy report, select File | Reporting | Edit | Legacy Report.
The HyperView report will open in run mode. Press CTRL + E to toggle between
editing the report in edit mode or testing it in run mode.

Since HyperView reporting is legacy functionality, the documentation doesn't actively


exist as topics in this documentation. Instead, you can download a PDF of the
HyperView documentation by following the link in this same topic from the help file.

Report Generation Sequence


This topic describes the process by which the report objects in report templates are
bound to measurement data and drawn in the Report window during the report
generation process.

• PC-DMIS executes each command from the measurement routine.


• Information from each command goes to the report template for possible
processing.
• Report objects on the report template are queried, and if the command from
which the information came is defined in the Rule Tree Editor (for information,
see "Defining a Rule in the Rule Tree Editor") to call a label template, then that
label template is called. If not, the information will not be displayed in the final
report.
• Data is sent to any called label templates to be formatted and displayed
according to how the GridControlObject and other reporting objects in the label
template are defined (for information see "The Object Bar").

4
Report Generation Sequence

• The report template finally displays the called label templates with their formatted
data and displays its own information and any static elements in the Report
window.

A - Measurement Routine Executes a Command

B - Data from Command Goes to Report Template

C - Command Defined in Rule Tree Editor (RTE)?

D - Nothing Happens

E - RTE Calls Label Template or Text Display

E1 - Label

E2 - Text

F - Textual Message Displayed Instead of a Label Template Call

G - Label Template Formats and Displays Passed Data

5
Reporting Measurement Results

H - Report Window Displays Information for Command

I - More Commands to Execute?

J - End

About the Report Window


To display the Report window, select View | Report Window. This window displays
your measurement results. The Report window acts as any other window in the PC-
DMIS application and is subject to the operations on the Window menu as well. The
Report window's title bar displays the pathway and filename of the current loaded report
template. The Report window also has its own Reporting toolbar.

With Report Templates

If you use report templates, this window, after measurement routine execution, displays
your measurement results and automatically configures the output according to a
default report template. You can set any report template as the default report template,
but initially PC-DMIS uses the "TEXTONLY.RTP" template.

6
About the Report Window

Report Window showing a standard, text-based report from TEXTONLY.RPT

The Report window contains static content based on the selected report template and
the current measurement routine. See "Creating Templates".

With Custom Reports

For a Custom Report, this window does not use a report template to configure or display
its data. Instead, it loads the information that you've already defined in the stored
custom report. See "Creating Custom Reports".

7
Reporting Measurement Results

Reporting Toolbar

Reporting toolbar

The Report window's Reporting toolbar performs these functions:

1. Redraw the Report - Redraws and updates the report with newly added
changes. If you modify the current report template, label template, or custom
report, or your measurement routine changes, click this icon to redraw and
update your report to use the newly-modified template or new data from your
measurement routine.

2. Preview Pane - Opens and closes a pane of thumbnail images so that you
can preview the report. Each image on the pane corresponds to a page on the
report. For more information, see "Working with the Preview Pane" in this
chapter.

3. Template Selection - Displays a dialog box that allows you to manage your
templates and select a template from which to generate your report output. For
more information, see "Applying or Removing a Report Template".

4. Custom Report Selection - Displays a dialog box that allows you to create
a new blank custom report or open an existing custom report. For more
information, see "Creating Custom Reports".

5. Print Report - Prints the report based on the output settings defined for the
Report window. For information on defining your output, see "Setting Output and
Printer Options for the Report Window" in the "Using Basic File Options" chapter.

6. Set this report as the default report - Sets the current template on the
screen as the new default template for your current measurement routine. PC-
DMIS automatically uses the defined default report template whenever you open
8
About the Report Window

your measurement routine at a later date. Initially, this default report is set to
TEXTONLY.RTP.

The drop-down menu next to this icon lets you set a default report without
having to load it first. It displays all the saved report layouts.

To set the default report, select the item from this list. PC-DMIS places the
check mark next to it to indicate it as the new default report. The currently
loaded report is indicated by a bold font.

For example, in the above image, the check mark indicates TextOnly.rtp as
the default report and CADOnly.rtp as the current loaded report.

If you select No default report then nothing appears in your Report window
the next time you load the measurement routine and access the Report
window.

Setting a Default Report for All Measurement Routines

If you want to set a default report for all measurement routines, use the PC-
DMIS Settings Editor, access the FileMan section, and set the
DefaultReportTemplate registry entry to the name of the report
template you want to use. For information on registry entries, see the
"Modifying Registry Entries" appendix.

9
Reporting Measurement Results

7. Add Template to Toolbar - Saves the current report template or custom

report as a stored report, and a new stored report icon appears on the
toolbar with the same name as your template or custom report to the right of the
standard report icons. When you click the added icon, the Report window
automatically uses the saved template or custom report to display your report.

8. View Report Mode - Generates the report from the first command to the
last command in the measurement routine, regardless of how PC-DMIS last
executed the measurement routine.

9. Last Execution Report Mode - Shows only those items executed in the
most recent measurement routine execution. It also shows the commands in the
same order in which they were executed. If commands are executed multiple
times due to a loop, it shows those multiple executions as well.

The SaveExecuteList registry entry in the Reporting section of the PC-


DMIS Settings Editor determines whether or not this information is retained
when you later re-open your measurement routine. By default, this
functionality is enabled.

• If set to 1, PC-DMIS stores the items reported during your last


execution within your measurement routine, so you can easily view
them later by selecting the Last Execution Report Mode icon.
• If set to 0, PC-DMIS only stores the information temporarily. If you
close your measurement routine, PC-DMIS clears out this
information.

Partial Executions and Last Execution Report Mode

If you perform partial executions, PC-DMIS appends the reported items to


the execute list, potentially causing items to be reported that you don't need
reported. You can clear out any partially-executed items from the stored
execute list by performing a full execution.

10. View Last Saved Report - Restores the saved report data to what it was at
the time it was last locked. This includes the execute list, temporary modifications
made, and the mode that was last used (either Report Mode or Last Execution
Report Mode).

10
About the Report Window

11.
Selecting an item from this list sets the report's magnification in the Report
window. The zoom level doesn't affect how the report prints out, but you may find
these options helpful when previewing the report or determining what template to
use.
• For small percentages, the pages are laid out side by side horizontally first
and then vertically. You can also type in a specific magnification. Using a
small percentage makes it easier to rearrange pages. For more
information, see "Rearranging Report Pages".
• For large percentages, where you are zoomed in on one portion of the
report, you can pan the report by either using the scroll bars or by holding
Ctrl and dragging on the main page of the report (dragging on a label
moves that label). PC-DMIS drags the image in the direction that you pull
the mouse.

12. Lock the Report - Locks the Report window so that modifications can't be
made to any reports in the window. In addition, whenever you click this icon, PC-
DMIS saves the following:

• Temporary modifications you made


• The execute list
• The type of report mode used (Report Mode or Last Execution Report
Mode)

You can restore this saved information by clicking the View Last Saved
Report icon.

PC-DMIS shows the icon as "pressed" to indicate it is locked:

Also, with the Report window locked, the mouse pointer changes to this
symbol whenever you move the mouse over the window to indicate that the
report is in a locked state and cannot be modified:

11
Reporting Measurement Results

You can still scroll, print, and view items in the Report window, but you
cannot make any modifications to any report until you unlock the window by
clicking the icon again.

13. Save - Saves the edited custom report with the same name. PC-DMIS
enables this button if you enter edit mode with Edit report below.

14. Save As - Saves the custom report with a new name. PC-DMIS enables
this button if you enter edit mode with Edit report below.

15. Save/Print the Report - Displays a Report Output dialog box where you
can save the report as a .pdf, .rtf, or .txt file or send it to the default printer.

File Output - Determines whether or not the software sends the report to a file
when you click OK. The box beneath this check box defines the pathway and file
name for saving it as a file. Make sure the filename in this box lists a valid
extension.

Output Type - Defines the output type to generate when saving the report as a
file. If you type a different extension, the report is not saved to the file.

PDF - Generates a .pdf file using the current report template for the output.

RTF - Generates an .rtf file using the current report template for the output.

TXT - Generates a simple plain-text report using the default.rtp template. It


doesn't have any formatting.

12
About the Report Window

Print background colors and Print Black and White - Determines whether or
not to generate the report with background colors or as a black and white report.
For information, see where these are already documented in the "Setting Output
and Printer Options for the Report Window" topic in the "Using Basic File
Options" chapter.

Print Output - Sends the report displayed in the Report window to the selected
printer when you click OK. Initially, this is set to your default printer.

Print Setup - Displays the standard Windows Print Setup dialog box so you can
choose a different printer or change printer options.

16. Edit report - If your report is a custom report, this opens your report in edit
mode. If your report is one of these supported template reports (Text Only, Text
and CAD, CAD Only, or CAD-Only Landscape), the software converts it into a
custom report first, and then the software enters edit mode.

Be aware that template conversion does not support data from loops.

For information on editing custom reports, see "Editing or Deleting Custom


Reports". For information on custom reports and how to create them, see
"Creating Custom Reports".

17. Text Only

18. Text and CAD

19. CAD Only

20. Graphical Analysis

21. CAD-Only Landscape

22. PPAP

23. Plain Text

24. Text and CAD Out of Tolerance

13
Reporting Measurement Results

25. Form Plot

26. Default

For descriptions and examples of the standard reports (items 17-26 in this list), see
"Using Standard Reports" below.

27. This style of icon, if found to the right of the Default icon, depicts a modified
report template that has been saved to the toolbar. You can use the Report
Template Editor to modify existing templates or create new ones. For more
information, see "Understanding the Report Template Editor".

28. This style of icon, if found to the right of the Default icon, depicts a custom
report that has been saved to the toolbar. For information on custom reports, see
"Creating Custom Reports".

Customizing and Restoring the Toolbar

You can add your own templates or custom reports to the toolbar by using the Add
Template to Toolbar icon discussed above. When you add a report to the toolbar, a
new icon for that report or template appears on the right side of the toolbar. Each new
icon you add represents a stored custom report or custom report template.

• To remove any report icons from the toolbar, hold down Shift and then
drag the icon off of the toolbar. This only removes the template or report
from the toolbar; it does not delete the item from the system.
• To restore the toolbar to its original toolbar icons, you can do the following:

1. Close PC-DMIS.
2. Navigate to the C:\Users\<username>\AppData\Local\Hexagon\PC-
DMIS\<version>, where <username> is your Windows user name
and <version> is the version of PC-DMIS you are using.
3. Delete reportingtoolbar.dat.
4. Restart PC-DMIS.

14
About the Report Window

The Reporting toolbar only resides within the Report window. You need to
access the Report window to see it. You cannot select it from the toolbar area of the
main PC-DMIS interface.

Working with the Preview Pane

The Preview Pane button ( ) on the Report window's Reporting toolbar opens and
closes a pane of thumbnail images so that you can preview the report.

Each thumbnail image on the pane corresponds to a page on the report.

A Sample Preview Pane

When the pane is open, you can click on a thumbnail image to go to that report page.

Entering Edit Mode for Custom Reports

To perform certain operations with the preview pane, you need to place your custom
report into edit mode. This accesses a slimmed down version of the Custom Report
Editor. This lets you edit a report without leaving the usual PC-DMIS menu structure.
You can do this through either of these options:

• Click Custom Report selection dialog ( ) and then click Blank Report and
then Open.

• Click Edit report ( ).

15
Reporting Measurement Results

For more complex edits, you can still use the Custom Report Editor.

Adding and Deleting Pages in Custom Reports

In edit mode, you can add or delete pages on your custom report.

To add a page, click the large plus button ( ) after the last thumbnail image; or
right-click on any thumbnail image and select Add Page.

To delete a page, either select a thumbnail image and press Delete on your keyboard;
or right-click on the thumbnail image and select Delete Page. You must always have at
least one page in your report.

For more information on custom reports, see "Creating Custom Reports" in this chapter.

Ordering Pages in Reports

To define the order of pages in any report:

1. Locate the thumbnail image of the page you want to move.


2. Drag that page to the desired location up or down in the preview pane.

3. Release the mouse button when you see the crosshair cursor ( ) to insert the
page at that location.

16
About the Report Window

Moving Objects to Other Pages in Custom Reports

In edit mode, you can move one or more objects from one page to another page
through the thumbnail images.

1. Select the objects that you want to move until you see the green handles around
them. (You can press Ctrl to select multiple objects.)
2. Drag the objects onto the thumbnail image of the page where you want to place
the objects.
3. Release the mouse button.
4. Click on that thumbnail image to go to the page, and position the object.

Another way to move objects to another page is to cut the objects (Ctrl + X), click on the
thumbnail image of the page, and then paste the objects (Ctrl + V).

If you select a CADReportObject, and move that to a new page, any labels associated
with it also move with it. You cannot move labels to that object by themselves.

Sizing the Preview Pane

You can size the pane with your mouse pointer. To do that, drag the vertical bar that
separates the pane from the report. You can size the pane to a maximum of 30% of the
report's width and a minimum of 10% of the report's width.

PC-DMIS saves the visibility state of the pane and the pane's width to the current
measurement routine. PC-DMIS uses the last used visibility state and width for new
measurement routines.

Using Tooltips in the Report Window

Example report showing a tooltip with the name of the label being used

17
Reporting Measurement Results

By simply moving your mouse over different parts of the Report window, you can get
information in the form of a tooltip about what label is being used, or if there is no label,
the tooltip will display either the name of the object or the current page number.

• If the object is a label, the tooltip displays the label template file name.
• If the object is not a label, for example, if it's a TextReportObject or a
CadReportObject, the tooltip displays the object name that is defined in the
report template.
• If you hold the mouse over an empty space on the page, (technically the Page
object), the tooltip displays the page number.

These tooltips provide you with a simple way to find out what objects are being used in
the report.

For information on objects, see "The Object Bar".

Changing the Report Window's Contents

See the "Shortcut Menus in the Report Window" topic for a list of functions you
access to perform some of the modifications discussed in this topic and its subtopics.

While you can permanently change how and what information appears in your Report
window by modifying the underlying templates and the rules used, you can also perform
modifications to the objects on a Report window directly within the Report window by
using the information provided in the topics below.

18
About the Report Window

Please note that custom reports, templates, label templates, and other reporting
modifications are NOT backwards compatible.

Edit Text Reporting

Report dialog box

The Report dialog box (available with template reporting) lets you determine the overall
information that PC-DMIS includes in the Report window and how it displays that
information.

You can access this dialog box in these ways:

• Right-click on any text-only reporting text or white space at the end of the Report
window and then select the Edit Object menu item when the shortcut menu
appears.

19
Reporting Measurement Results

For additional information on this shortcut menu, see the


"Shortcut Menus in the Report Window" topic from the "Using Shortcut
Keys and Shortcut Menus: Introduction" appendix.

• Press Shift and then right-click on any label object in the Report window, and
then select the Edit Object menu item.

The following check boxes let you show or hide various items:

Show Features
This option displays all feature measurements in your measurement routine.

If you are using the default report template, textonly.rtp, and your measurement
routine measures a feature with more than the minimum number of points, it also
displays a form plot of the feature.

Show Alignments
This option shows alignment changes as they occur during the measurement
routine. It will display all alignment changes that occur in the dimension or feature
lists.

Show Comments
This option shows any comments that have been added to the measurement
routine. (For information on comments, see "Inserting Programmer Comments" in
the "Inserting Report Commands" chapter.)

20
About the Report Window

Show Header / Footer


This option displays a header and footer in your report by applying the label
template defined in the File Header rule of the Rule Tree Editor. By default this is
the FILE_HEADER.LBL label template that ships with PC-DMIS.

Show Screen Captures


This option displays any screen capture graphics related to DISPLAY/METAFILE and
ANALYSISVIEW commands in the report. (For information on screen captures, see
"Using Screen Captures of the Graphic Display Window" in the "Editing the CAD
Display" chapter.)

The Header after Print command area is enabled if you mark the Show Header /
Footer check box. This area determines how PC-DMIS handles a report header after a
PRINT/REPORT command. The list in that area contains these options:

Normal
PC-DMIS generates only one report header. It does not generate a new report
header even if you execute a measurement routine with a PRINT/REPORT
command in any kind of loop. (For information on the different kinds of loops, see
the "Branching by Using Flow Control" chapter.)

Always
PC-DMIS always generates a new report header for any next report output that
follows the PRINT/REPORT command.

If File Header executed


PC-DMIS generates a new report header only if you executed the File Header
command block before the PRINT/REPORT command. The File Header is the
command block in the Edit window that has the part name, revision number, serial
number and so on. (This shows as "File Header" in Summary Mode.) By default,
the File Header uses the FILE_HEADER.LBL template during report generation.
While you cannot delete the File Header command block, you can skip over it with
certain partial execution options, such as Execute from cursor. (For more
information on partial execution, see "Executing Measurement Routines" in the
"Using Advanced File Options" chapter.)

For more information on the PRINT/REPORT command, see "Inserting a Print


Command" in the "Inserting Report Commands: Introduction" chapter.

The Dimensions area allows you to control the display of dimensions in your reports.
To display dimensions, select the Show check box. Once selected, the other items in
this area become available for selection. These include:

21
Reporting Measurement Results

All
Selecting this option acts just as if you had selected both the Out of Tolerance
Only and Dimensions Outside Limits options.

Out of Tolerance Only


If this option is marked, PC-DMIS will only show the out of tolerance dimensions.
("Show Dimensions" must be ON.)

This option is only available when you select Show Dimensions and deselect
Show Dimensions Outside Limits.

Dimensions Outside Limits


If you select this option, PC-DMIS will only show the dimensions that lie outside
the percentage of the tolerance zone.

When you select the Show Dimensions Outside Limits check box, the tolerance
percentages will become editable, allowing one percentage for unilateral
tolerances and an upper and lower percentage for bilateral tolerances.

The tolerance zone can be considered as a range between 0 and 100 percent
(similar to how dimension colors are applied to tolerance zone regions or how the
colored bar graphs are drawn at the end of dimensions). The lower limit (nominal -
minus tol) corresponds to 0% and the upper limit (nominal + plus tol) corresponds
to 100%. Consider the following chart where A, on the center of the chart,
represents the nominal value:

Chart

Dimensions that have deviations outside the tolerance zone will either be
less than zero or greater than one hundred percent.

For a unilateral dimension (like roundness, which only has a plus tolerance),
the zero deviations are at zero percent, and out of tolerance is anything
larger than one hundred percent.

Unilateral Example

Nominal: 0.0000

Measured: 0.0028

Deviation: 0.0028

22
About the Report Window

Plus Tol: 0.0050

Minus Tol: 0.0000

Because this deviation is 56% of the tolerance range, it will be


displayed if Unilateral Percentage is less than 56%.

For a bilateral dimension (like distance, which has both a plus and minus
tolerance), the zero deviations are somewhere in the middle. If the
tolerances are equal, the zero deviations will be at the fifty percent position.

Bilateral Upper Example

Nominal: 3.0000

Measured: 3.0075

Deviation: 0.0075

Plus Tol: 0.0100

Minus Tol: 0.0100

The percentage is calculated using the Lever Rule:

(measured value – lower limit) / (upper limit – lower limit) * 100.

With this data, it would be:

(3.0075-2.9900) / (3.0100-2.9900) * 100. = 87.5%

This dimension will be displayed in the inspection report if the Bilateral


Upper Percentage is greater than 87.5%.

Bilateral Lower Example

Nominal: 3.0000

Measured: 2.9925

Deviation: 0.0075

Plus Tol: 0.0100

Minus Tol: 0.0100

23
Reporting Measurement Results

The percentage is calculated using the Lever Rule:

(measured value – lower limit) / (upper limit – lower limit) * 100.

With this data, it would be:

(2.9925-2.9900) / (3.0100-2.9900) * 100. = 12.5.%

This dimension will be displayed in the inspection report if the Bilateral


Lower Percentage is less than 12.5%.

Use Text Mode Dimension Reporting


This check box determines whether PC-DMIS uses formatted text (selected) or
uses a graphics table (not selected) for displaying the dimensions.

24
About the Report Window

Sample Report with "Use Text Mode Dimension Reporting" Selected:

Sample Report with "Use Text Mode Dimension Reporting" Not


Selected:

If PC-DMIS cannot find a specified report template, it will use a template


named "default.rtp". This generic template provides you with a basic text-based
report. Since default.rtp only supports text-based reporting, clearing this check box
will do nothing.

Edit Label Reporting

25
Reporting Measurement Results

If you right-click on a label and click Edit Object, the Label Properties dialog box
appears.

Label Properties dialog box

With this dialog box you can change the order of columns and rows, or you can control
the visibility state of individual columns and rows.

To change the order - Select a row or column, then click the black up or down arrow.

To hide or show an item - Clear the check box next to the item to hide it. Select the
check box to display it.

Once you have made the desired modifications to the label, select one of the option
buttons at the bottom to apply the changes to the current label, all similar labels on the
current page, or all similar labels in the entire section.

Determine what the label will do whenever you hide or show columns, by selecting an
item from the Resize Type list. For a label associated with a CadReportObject, Resize
Grid is the only option. For other label contexts, these three items are available:

Resize Grid - This retains existing column sizes and resizes the label to fit the new
width.

Resize Columns to Fit - This retains the label's existing width and resizes each column
equally to fit the existing width.

Hide Text - This doesn't resize the label or the columns. It simply hides the text.
26
About the Report Window

Click OK and PC-DMIS will change the display.

Edit Label Positioning and Size


If your label has leader lines or it is a free label (it isn't part of a TextReportObject), if
you press CTRL and then click on a label (or if you drag the mouse to box-select a
label), you will see that it becomes selected. Once selected, you can drag it to a new
location or re-size it by clicking and then dragging the black square handles that
surround the selected label.

Edit CAD Model Reporting


If you double-click on any CadReportObject, it becomes "active". This means you can
rotate or zoom the CAD model to how you like it, just as you can inside the Graphic
Display window. Click outside of the CadReportObject to use the new orientation and
zoom level. See "CadReportObject" for information on this.

If you right-click on a CadReportObject in the Report window, and select Edit Object,
PC-DMIS displays the Label Layout Wizard, allowing you to quickly modify label
positions and the CAD model's location directly within the Report window. See "The
Label Layout Wizard" topic under the "CadReportObject" for information on how to use
this wizard.

You can size and move the CadReportObject as described in "Edit Label Positioning
and Size".

Edit Graphical Analysis


If you right-click on an AnalysisWindow object in a Report window and choose Edit
Object, a Graphical Analysis dialog box appears:

27
Reporting Measurement Results

For information on the options on these tabs, see the "Changing Properties" sub-topic in
the "AnalysisWindow Object" topic of the current chapter.

The items that appear shaded are items that are not available for modification on the fly.
However, you can modify them at the label template level. For information on editing
label templates, see "About Labels and Label Templates" in this chapter.

Changing Label Templates on the Fly


PC-DMIS provides you with a way of changing on the fly a label template used in a
report.

Changing a Single Label Template

From the Report window (View | Report Window), select the label template and then
right-click on it and select the Change Template... menu item. You can then select the
new template to use from the Open dialog box.

28
About the Report Window

Changing Multiple Labels on the Same Page

To select and replace multiple labels on the same page, hold down CTRL, select
multiple templates, and then select the Change Template... menu item. Alternately, you
can choose Select Matching Labels to choose all the labels in a CADReportObject
that use that same label and are on the same page.

Removing Report Window Modifications


Removing Modifications to One Object

To quickly remove modifications that you have made to a report object (a


TextReportObject, CADReportObject, or Label object), right-click on the desired object,
and select the Remove Object Modifications menu item.

• If only one modification was made to an object, PC-DMIS will return the report
object back to its default state.
• If more than one modification was made, PC-DMIS displays the Remove
Modifications dialog box. This dialog box contains check boxes next to each
type of modification made, allowing you to remove targeted modifications to the
report object by selecting the modification to remove and clicking OK. The
Remove all except for location check box removes all modifications made to
that object except for repositioning changes.

29
Reporting Measurement Results

A Sample Remove Modifications dialog box showing two different modifications on


an object

Removing All Modifications

To quickly remove all object modifications on a report template, select the File |
Reporting | Clear Template Associated Data menu item.

Removing Pan, Zoom, Rotate Modifications for a CAD Object

You can also remove just pan, zoom, and rotate modifications for the
CADReportObject. To do this, right-click on the object in the Report window, and
choose Remove CAD Reporting Object Pan/Zoom/Rotate MOD. Other mods (such
as section cuts, various label definitions, solid or wire displays and so forth) are not
affected.

Using Standard Reports


The default standard report template, TEXTONLY.RTP, is a simple template that plugs
measurement data into a TextReportObject to show text-based information in a more
graphical way.

30
Using Standard Reports

Report Window showing a standard, text-based report

If the TEXTONLY.RTP standard report template doesn't show what you need, PC-DMIS
also ships with additional standard report templates that you may find useful. You can
easily change the layout used for the current report by clicking the desired icon from the
Reporting toolbar. These are the standard report templates:

• Text Only (TEXTONLY.RTP) - This template uses the TextReportObject


with some standard labels included.

31
Reporting Measurement Results

• Text and CAD (TEXTANDCAD.RTP) - This template uses the


TextReportObject and the CadReportObject with some standard labels included.

• CAD Only (CADONLY.RTP) - This template uses the CadReportObject with


some standard labels included in portrait layout. Since this template supports
fewer labels than CADONLY_LANDSCAPE.RTP (up to 10), the labels are larger
and more detailed.

32
Using Standard Reports

• Graphical Analysis (GRAPHICALANALYSIS.RTP) - This template uses


the Analysis Object to provide you with a graphical analysis of each form
dimension (such as Flatness, Roundness, and so forth) sent to the report. It will
not show an analysis for non-form dimensions. PC-DMIS graphically displays the
deviation of each individual hit for the dimensions used. The report displays the
error in the form of individual arrows for each hit. These arrows, with their colors
and directions, indicate the relative size of the error, as well as its direction.

• CAD-Only Landscape (CADONLY_LANDSCAPE.RTP) - This is similar to


CAD Only, but it displays in landscape layout. Since this template supports more
labels than CADONLY.RTP (up to 30), the labels are smaller and less detailed.

• PPAP (PPAP.RTP) - This template produces a report that can be used in


Production Part Approval Process (PPAP).

• Plain Text (PLAINTEXT.RTP) - This template produces a simple report


without any formatting. The report retains its table-like organization.

• Form Plot (FORM PLOT.RTP) - This template produces a very similar


report to the graphical analysis report, except it produces a larger output,
displaying one form analysis per page. You must use a form dimension
(circularity, cylindricity, flatness, straightness, line profile, or surface profile) to
see data in this report.

• Text and CAD Out of Tolerance (TEXTANDCAD_OOT.RTP) - This


template produces a text and CAD report showing the out-of-tolerance
dimensions.

• Default (default.rtp) - This template produces a raw text (legacy) report.


This is similar to reports used in older versions of PC-DMIS when the software
didn't have a dedicated Report window. PC-DMIS defaults to this report if it
cannot locate or display other report templates.

These templates are accessible from the Report Templates dialog box by default. For
information on accessing and using this dialog box, see "Applying or Removing a
Report Template". The actual template files are located in a public Reporting sub-
directory.

33
Reporting Measurement Results

You can find the Reporting folder at this location. This folder contains all the templates
that the Report window uses:

C:\Users\Public\Documents\Hexagon\PC-DMIS\<version>\Reporting

<version> represents the PC-DMIS version. If you want to customize existing


templates or create new ones, do so in that directory.

If you need to restore any modified template to its factory settings, you can copy it
from the DefaultReportingTemplateBackup directory located within the PC-DMIS
installation directory and paste it the above Reporting directory.

Do not modify the templates in the DefaultReportingTemplateBackup directory.

If you load a measurement routine that uses a report template that does not
exist in the specified reporting directory nor in the directory where you installed PC-
DMIS, then PC-DMIS generates a text-only report template on the fly called
"default.rtp". This allows you to always see a report in the Report window even if you
don't have the specified report template. Remember, default.rtp only displays
information in a text-only format. This means you cannot deselect the Use Text Mode
Dimension Report check box in the Report dialog box. For information on accessing
and using the Report dialog box, see "Changing the Report Window's Contents".

34
Viewing a Legacy Text Report

Viewing a Legacy Text Report

Report Window showing a legacy text report

This topic discusses how you can get a legacy (old style) text-only report to show up in
your Report window. PC-DMIS version 3.7 and earlier used this report type.

For this report type, you must only use legacy dimensions in your measurement
routine.

35
Reporting Measurement Results

You can toggle between using the legacy dimensions and the newer Feature
Control Frame dimensions by selecting the Insert | Dimension | Use Legacy
Dimensions menu item.

For information on using the .DAT files with this template, see "Using .DAT Files in
Generated Reports".

1. Select View | Report Window to open the Report window.

2. From the Reporting toolbar, click the Default icon .


3. This step is optional. If you intend to modify the finished report inside an RTF
editor, you may want to change how RTF files are converted. In the PC-DMIS
Settings Editor, expand the Printing section, and set DoNotUseAmyUniRTF to
2. Click Save Setting and then click OK. This makes the text for the report print
to RTF files like it used to in 3.7 and earlier. If this is set to 0 (the default),
characters show up inside of text boxes.

Reported Tolerance Zones for Form


Dimensions
PC-DMIS displays the tolerance zone for form dimensions as a linear graphic. For text
mode reporting, this zone is comprised of characters with the number sign (#) indicating
the amount of deviation. For non-text mode reports, this is shown as a bar graph with
the bar growing larger from left to right as the deviation increases. For the non-text
mode dimensions the color of the bar graph changes as deviations move towards out of
tolerance.

36
Reported Tolerance Zones for Form Dimensions

For form dimensions (Straightness, Flatness, Circularity, and Cylindricity)


there is no negative tolerance, so the linear graphic represents the deviation from
perfect form (0 tolerance) where the extreme left of the graphic is 0 tolerance and the
extreme right of the graphic is the maximum allowed tolerance.

Example Depicting Both Text Mode and Non-Text Mode Tolerance Zones

In the graphical example given above, the tolerance zone is indicated in both text-mode
and non-text-mode with a deviation of 0.186 and a maximum tolerance of 0.3.

Here are some additional examples showing how a Circularity dimension's tolerance
zone appears inside of PC-DMIS as a text-mode and non-text mode report respectively:

A Sample Text Mode Tolerance Zone

A Sample Non-Text Mode Tolerance Zone

37
Reporting Measurement Results

Rearranging Report Pages


PC-DMIS provides you with a drag-and-drop approach to rearranging pages in the
Report window (View | Report Window).

You can also rearrange pages with the Preview Pane. For more information, see
"Working with the Preview Pane".

To rearrange pages use this procedure:

1. Size the report magnification to where you can view the pages you want to
rearrange, probably somewhere around 25%.
2. Hover your pointer over any report page. Notice that at the top left of the page a
small cross-hair icon appears. Click that icon.

3. Drag your pointer to drag the current page.


4. Drag the page on top of an existing page. The target page receives a red
highlight and the pointer cursor changes.

38
Modifying Standard Templates

5. Release the mouse button. PC-DMIS arranges the ordering of the report pages
according to the direction in which you dragged the report page.

• If you drag and drop the page to a page earlier in the existing page
sequence, the page will be inserted before the page on which it was
dropped.
• If you drag and drop the page to a page later in the existing page
sequence, the page will be inserted after the page on which it was dropped.

Suppose you have a sequence of seven pages in your report: p1,


p2, p3, p4, p5, p6, p7. If you drag p4 and drop it at p2 (earlier in the
sequence), the order will be p1, p4, p2, p3, p5, p6, p7. If you then drag p4
and drop it at p5 (later in the sequence), the order will be: p1, p2, p3, p5, p4,
p6, p7

6. Continue rearranging pages as needed.

Modifying Standard Templates


You may want to modify the standard reporting and label templates that ship with PC-
DMIS.

39
Reporting Measurement Results

• To change your report's header, see "Modifying the Report's Header".


• To change properties in a standard template report, open the template in the
template editor, right-click on the object, and modify its properties in the
Properties dialog box. For information, see "About Object Properties".

If you want to create entirely new templates, see "Creating Templates".

About the Reporting Directory

You can find the Reporting folder at this location. This folder contains all the templates
that the Report window uses:

C:\Users\Public\Documents\Hexagon\PC-DMIS\<version>\Reporting

<version> represents the PC-DMIS version. If you want to customize existing


templates or create new ones, do so in that directory.

If you need to restore any modified template to its factory settings, you can copy it
from the DefaultReportingTemplateBackup directory located within the PC-DMIS
installation directory and paste it the above Reporting directory.

Do not modify the templates in the DefaultReportingTemplateBackup directory.

Using .DAT Files in Generated Reports


PC-DMIS uses the LOGO.DAT, HEADER.DAT, and ELOGO.DAT data files to a limited
extent in a generated report. For information on these data files, see "Modifying the Edit
Window's Headers and Footers" in the "Using the Edit Window" chapter.

• LOGO.DAT populates the beginning of the report.


• HEADER.DAT populates the header of each subsequent page.
• ELOGO.DAT populates the ending text on the last page of the report.

Conditions for this to Work

• You must use a report template that does not contain rules, such as default.rtp.
• The UseLogoElogoHeaderDat registry entry in the Reporting section of the
Settings Editor must be set to 1, the default value.

40
Modifying the Report's Header

Limitations of Using .DAT Files

• Bitmaps are placed at the top of the report, regardless of where in the .DAT files
they're defined.
• The last page will not contain the HEADER.DAT information if the only item on
the last page is ELOGO.DAT.

Modifying the Report's Header


Many users want to change the header in some way. Usually, they want to modify the
default image that appears in the default report's header to something more company-
specific. You can change the header image by following one of these procedures below.

To Change Only a Header's Image:

If you only need to change the image and not other elements in the header, we
recommend this:

1. Access the report in the Report window or load a custom report inside a Custom
Report Editor.
2. Right-click on the header (such as FILE_HEADER.LBL).
3. Choose Change image to show the Open dialog box.
4. From the Open dialog box, locate the desired image, and then click Open to
update the report with the image. This action also updates the underlying label
template (.lbl) with the new image.

To Modify an Entire Header in the Label Template Editor:

1. Open the label template in the Label Template editor.

o Select File | Reporting | Edit | Label Template. An Open dialog box


appears.
o Select the FILE_HEADER.LBL template and click Open.
o In the Label Template Editor you should now see the edit area filled with a
GridControlObject. This object controls all the header data that you see in
the report.

2. Change the header's image.

41
Reporting Measurement Results

o Double-click on the GridControlObject. You will see a hash border around


the object. This tells you that you can edit the code or items inside of the
header.
o Right-click on the PC-DMIS graphic, and a Grid Properties dialog box
appears.
o In the Cell tab, click Select. An Open dialog box appears.

Example showing the button to use to change the report header's graphic

o Navigate to the new graphic image you want in the header, select it, and
click Open. The dialog box closes.
o Click Apply. The new graphic appears in the cell.

3. Make other modifications to the header as desired.


4. Save and test the modified label template.

o Once you have configured things as desired, click OK, and then select File
| Save to save your changed Label Template.
o Select File | Close to close the Label template editor, returning to your
measurement routine.
o Select View | Report window. If your change doesn't immediately appear,
select the Redraw the report icon from the Reporting toolbar.

42
Modifying the Report's Header

Here are some other options to consider:

Using LOGO.DAT, HEADER.DAT, and ELOGO.DAT in Generated Reports

To a limited extent, you can use the # keywords contained in these .DAT files to define
the information that appears in your generated report. See "Using .DAT Files in
Generated Reports" for more information.

See "Modifying the Edit Window's Headers and Footers" in the "Using the Edit Window:
Introduction" chapter for information on the # keywords.

Converting LOGO.DAT, HEADER.DAT, and ELOGO.DAT Keywords

You can also use PC-DMIS's own Report Expressions to accomplish the same thing as
the # keywords contained in the .DAT files.

The following table details the equivalent Report Expression or report object to use and
where to use it.

Equivalent Command in
.DAT # Keyword Functionality
Report Template
=SYSTEMDATE("MMMM dd,
#DATE Inserts the current date.
yyyy")
#TIME Inserts the current time. =SYSTEMTIME("HH:mm")
Inserts the current page
#PAGE =Page()
number.
Inserts the value of trace field
#TRn n, where n is the trace field =TRACEFIELD(n)
number.
Inserts the measurement
#PARTN =PARTNAME( )
routine name.
#DRWN Inserts the revision number. =REVNUM()
#SERIALN Inserts the serial number. =SERNUM( )
Inserts the sequence
#SEQUENCE (Not applicable)
number.
#SHRINK Inserts the scale factor. =MEASSCALE()
Inserts the total number of
#NMEAS =NUMMEAS()
dimensions.

43
Reporting Measurement Results

Inserts the total number of


#NOUT dimensions that are out of =NUMOUTTOL()
tolerance.
Inserts the time elapsed
#ELAPSTIM between start and end of =ELAPSEDTIME()
execution.
Inserts a bitmap of the
#BMP=bitmappath Use Bitmap object
specified full path and name.

For information on using other expressions in your report templates, see "About Report
Expressions".

For information on limitations on using variables inside report headers, see "Displaying
a Variable's Value".

Changing the Report's Text Colors


At times you may want to modify the default text colors used in your report. To change
these text colors, access and modify the Color Editor dialog box for your report
template's TextOnlyObject:

1. Select File | Reporting | Edit | Report Template.


2. Select the report template for which you want to change the colors.
3. In the Report Template editor, select the TextReportObject, and right-click on it
to access the Properties dialog box for that object.
4. Select the Colors property from the Properties dialog box.
5. The Color Editor appears. This is the same editor as used for the Edit window,
but in this case it modifies the TextOnlyObject used in your report template. For
information on how to use the Color Editor, see "Defining Edit Window Colors" in
the "Setting Your Preferences" chapter.
6. Make your changes, and then save the template.
7. Load the template into the Report window.

44
Adding Notes to a Report

Adding Notes to a Report


It's often useful to add your own notes to a report after it has executed. One way to add
notes is to use PC-DMIS's standard Comments functionality and allow PC-DMIS to
display the comments in the Report window. But this approach has some limitations.
Displaying comments only works on report templates that use the TextReportObject.
Besides, by default, standard comments aren't very visible, and they only appear within
the TextReportObject at the location they were executed. Also, you aren't able to easily
edit them after they're on the report. For information on comments, see "Comments" in
the "Using the Edit Window" chapter.

However, if you want more flexibility, consider the option of adding a note box into which
you could type your notes directly onto the final Report. The following steps provide you
with a procedure on how to do this:

Step 1: Create the Note Box

To create a note box, create a new label template inside the Label Template Editor, and
drag a Text object onto the editing area. Format the object with font size, font color,
background color and borders as desired. If you want your note box to be transparent,
select the NIL background color. Set the object's Text property to hold this value:
"Right-click here and select Edit Object to modify this note text." Save your label
template.

A new label template named notes.lbl

(A) - Right-click here and select Edit Object to modify this note text.

45
Reporting Measurement Results

Step 2: Tie the Note Box onto the Report Template

Open up a report template inside the Report Template Editor that you can edit. Drag a
Label object onto the editing area, and position it more or less where you want the note
box to appear. You can change its final position in the Report window.

A label object added onto a TextAndCad Report

Step 3: Tell PC-DMIS When to Display the Note Box

Right-click on the label object to access the Properties dialog box, and then click Rules
to bring up the Rules Tree Editor. The new label object does not yet have any rules.
Add a rule for the Default item at the top of the tree, and have the rule pull in the label
template you saved in Step 1. This action causes the label template containing your
note box to show up on every page of the report. Save your changes.

46
Adding Notes to a Report

A rule specifying to load notes.lbl assigned to the Default item

Step 4: Test the Report

Access the Report window and load in your modified report template. Notice that your
note box appears with the instructions on how to change its default text. Double-click to
activate the object and drag it to a new location if desired.

A note box with default text

(A) - Right-click here and select Edit Object to modify this note text.

47
Reporting Measurement Results

Step 5: Modify the Note Box Text

To change the text in the note box, right-click the object and select Edit Object. A
Label Properties dialog box appears.

The Label Properties dialog box

(A) - Right-click here and select Edit Object to modify this note text.

Type your new note text in the Change to: box and click OK. PC-DMIS updates your
text.

48
About the Reporting and Form Editors

A note box with updated text

(A) - Please Review Soon

And that's all there is to it. Of course, you can modify the note box to better suit your
needs. For example, if you wanted a table-like structure in your note box, on Step 1,
instead of a single text object in the label template, you could add in a
GridControlObject into the label template and then overlay the cells with Text objects.

If you wanted to show only the note box based on certain conditions, you could change
the rules used in the Rules Tree Editor in Step 3. For example, if you only wanted the
note box on the first page of your report, you would use the File Header item instead.

About the Reporting and Form Editors


The Report Template Editor, Label Template Editor, Custom Report Editor, and Form
Editor modify existing or create new, templates, custom reports, and forms. These
editors share many of the same common user interface elements: the menu bar, the
toolbars, the object bar, and so on. While the individual icons or items on these menus
may change between editors, the look and feel are essentially the same.

The user interface is discussed in the following topics.

Menu Bar for the Form and Reporting Editors


File menu

File | New - Creates a blank template or form.

File | Open - Opens a previously stored report template file or form.

File | Close - Closes the template editor or form.

49
Reporting Measurement Results

File | Save As - Saves the current template or form with a new file name. See "Saving a
Template or Form to an Earlier Version"

File | Edit / File | Run - Lets you toggle between the editor's two modes: Edit Mode and
Run Mode. Run mode lets you "run" or test a form. Edit mode lets you modify a
template or form. (Run mode only works with the Form Editor; it does exist in the Report
or Label template editors.)

File | Exit - Exits PC-DMIS. If you have unsaved changes, PC-DMIS will display a
message box asking if you would like to save them.

Edit menu

Edit | Layout | Align Objects, Space Evenly, Center in View, Make Same Size -
These submenus lets you layout, align, and space objects in the editor. See the "Layout
Bar" for additional information.

Edit | Layout | Properties - Displays the property sheet for the currently selected
object. If no object is selected, this displays the property sheet for the editing area
(called a "Section" or "The Frame/View"). See "Property Sheet" and "About Sections".

Edit | Layout | Check Mnemonics - This menu item ensures that any shortcut keys
using the ALT key plus a letter are unique on form or template items that have a text
display (such as buttons).

To define a shortcut key for a form or dialog box control, type an ampersand symbol (&)
before the character. For Example:

A button with the text label of "&Continue", looks like "Continue" on the form
and is accessible with ALT + C.

Edit | Layout | Grid Settings- Displays the Grid Settings dialog box. This dialog box
lets you display or hide a grid of points on your layout's background. See "Working with
the Grid".

Edit | Layout | Objects - Displays the Object Sheet dialog box. Use this dialog box to
view or select the objects in the Form and to set their tab order. See "Object Sheet".
(Only available in the Form Editor.)

50
About the Reporting and Form Editors

Object Sheet dialog box

Edit | Order - This submenu lets you move objects behind or in front of other objects
that overlap each other.

Edit | Undo - Lets you undo the last action taken in the editor.

Edit | Redo - Lets you redo the last undone action.

Edit | Cut - Cuts the object and stores it for pasting.

Edit | Copy - Copies the object and stores it for pasting.

Edit | Delete - Deletes the selected objects.

Edit | Paste - Pastes the cut or copied object. If from a copied object this often this
pastes the object right on top of the copied object, so you will need to drag it to a new
location or else it will overlap the object from which it was copied.

Edit | Paste Special - This differs from the standard Paste menu item since it allows
you to maintain a link between the pasted item and the source from which it was copied
so that if the source changes, the pasted item will also get updated. For Example:

Suppose you want to place a Microsoft Excel chart object in your Hyper
Report, and you want to keep the chart's data in synch with the data from the Excel file.
To do this:

1. In the Microsoft Excel file, copy the chart object.


2. Access your template or form.
3. Select Edit | Paste Special. The Paste Special dialog box appears.
4. Select the Past Link option.
5. Click OK. The chart object appears in your template or form.

51
Reporting Measurement Results

Now, if you make changes to the data for your chart object in your Excel file, PC-DMIS
will update the chart object in the report or form.

Edit | Set Tab Order - This lets you determine the objects that get selected when a
user presses TAB to cycle through objects in Run Mode. (This only works in the Forms
Editor.)

Edit | User Assigned Properties - Accesses the User Assigned Properties dialog
box, allowing you to manage all your user assigned properties at once. See "Working
with User Definable Properties". (Only available in the Report Template Editor.)

View menu

View | Graphic Display Window, Edit Window, Preview Window, Form Editor,
Marked Sets Window, Basic Script Editor, Inspection Report, Probe Readouts,
Probe Toolbox - Shows or hides these PC-DMIS windows or editors. Most of the time
these do not serve any purpose when working in the editor and you can hide them.

View | Object Bar - Displays the editor's Object Bar. See "Object Bar".

View | Layout Bar - Displays the editor's Layout Bar. See "Layout Bar".

View | Font Bar - Displays the editor's Font Bar. See "Font Bar"

View | Ruler Bars - Displays the rulers on the top and left sides of the editor. See
"Toggle Ruler"

View | Snap Points - Displays the "snap points" for any of the objects in the editor. See
"View Snap Points"

View | Route - This only functions with snap points. On complex pages with a lot of
objects, you may find it useful to use this menu option to see the chain of objects
connected to the currently selected object via snap points. This menu option selects all
objects connected in some way by snap points to the currently selected object. (Only
available in the Form Editor.)

Windows menu

This menu lets you perform standard window manipulations with any of the windows in
PC-DMIS. See the "Navigating and Displaying Multiple Windows" chapter.

Help menu

Help | Index - Accesses the PC-DMIS Help file.

Help | Using Help - Displays a topic about using the Help file.

52
About the Reporting and Form Editors

Help | About PC-DMIS - Displays the About PC-DMIS dialog box, showing information
about your version of PC-DMIS.

The Font Bar


The editor's Font Bar lets you modify frequently modified font, color, background, line,
and other properties for various objects.

The following options are found on the Font Bar:

1. This list defines the object's font if it supports text. You can also set this in the
Font property.
2. This value defines the object's font size if it supports text. You can also set this in
the Font property.
3. Bold - This button displays your object's text in boldface. You can also set this in
the Font property.
4. Italic - This button displays your object's text in italics. You can also set this in
the Font property.
5. Left, Center, and Right - These buttons align your text to the left side, center, or
right side, of the object. You can set also this in the Alignment property.
6. This list defines the background color of your object. You can also set this in the
BackColor property.
7. This list defines the foreground color of your object. Foreground sets any text and
border colors. You can also set this in the ForeColor property.
8. PenWidth - This button sets the border or line's width. Clicking this multiple times
switches between various options. You can also set this in the LineWidth
property.
9. PenStyle - This button sets the style of a line (does not apply to borders).
Clicking this multiple times switches the line style between a solid line and
various dotted lines. You can also set this in the LineStyle property.

53
Reporting Measurement Results

10. Arrowhead - This button places arrowheads at the end or ends of a Line object.
Clicking this multiple times switches the arrow to different locations on either or
both ends of the line. You can also set this in the Arrowhead property.
11. Hatch Style - This button sets a background pattern, called a "hatch style", on an
object that supports hatch styles. Clicking this multiple times switches between
the available hatch styles. You can also set this in the HatchStyle property.
12. Shadow Style - This button sets a shadow under the object if the object supports
shadows. Clicking this multiple times switches between the available shadow
styles. You can also set this in the ShadowStyle property.

The Object Bar


The Object Bar is a toolbar that lets you insert various objects into a template or
objects and controls into a form. You can insert text, pictures, multi-media, dialog box
controls, special PC-DMIS specific objects, and other items to help you create custom
labels, reports, and forms.

This bar appears whenever you enter an editing environment such as the Report
Template Editor, the Label Template Editor, the Custom Report Editor, or the Form
Editor.

The Object Bar comes in one of these types, one for each editing environment:

Report Template Label Template Custom Report Form Editor


Editor Editor Editor

54
About the Reporting and Form Editors

Adding Objects:

To add an object to a template, custom report, or form:

1. Inside the appropriate editor, access the Object Bar.


2. Click on the object you want to insert into your report.
3. Next, hold down the left mouse button and drag a rectangle on your current
section.
4. Finally, release the mouse button.
5. Upon creation, the object is selected, as shown by small green squares, called
handles, at each corner of the object.

A sample Text object showing handles

Selecting and Manipulating Objects:

To manipulate an object you have to first select it. To select an object, click on the
object so that the green handles are showing.

55
Reporting Measurement Results

To drag an object to a new location - Select the object. Click and hold the
mouse on top of the object, then drag it to the new location. Release the mouse.

To resize an object - Select the object, move your mouse over one of the green
handles until it changes to a resize cursor, a line with two arrows. Then click on
the handle and drag the mouse to a new location. Release the mouse. The object
expands or shrinks.

To change an object's properties - Select the object, right-click on the object so


that the Properties dialog box appears. Select properties and change them as
desired.

To align, group, ungroup, and perform other operations - Use the Layout Bar
or the Edit | Layout and Edit | Order submenus.

Coding Objects to Change Dynamically

For some objects, you can use BASIC scripting to dynamically change certain
properties of those objects. For example, you could use code to automatically populate
plotted points on a Graph object, or you might want to use the Gauge object like a bar
graph of some sort. For an example of how to do this, see the topic, "Example of Using
BASIC Scripting to Dynamically Change the Gauge's Value"

ActiveX Object

The ActiveX Object inserts an ActiveX control into your template or form. Once it
inserts the control, PC-DMIS displays the Insert ActiveX Control dialog box.

Insert ActiveX Control dialog box

This dialog box allows you to select the type of control you want to insert from a list of
known controls on your computer. The controls in the Object Type list are unique to

56
About the Reporting and Form Editors

each computer, based on the programs installed on your computer. ActiveX controls
expand the possibilities of what you can do in a form or template. For example, you
could insert a chart control and then with Visual BASIC code, pass measurement
routine data to dynamically create the chart.

PC-DMIS ActiveX Controls

PC-DMIS ships with ActiveX controls, most of which are related to feature analysis. The
feature analysis controls appear in certain cells of the GridControlObject on some of
the standard labels that come with PC-DMIS. In general, the software uses these
controls to display graphical analysis information. You can insert these into your own
templates or forms from the Insert ActiveX Control dialog box.

The PC-DMIS ActiveX controls related to feature analysis are shown here with graphical
examples:

BFANALYSISACTIVEX:

DIMANALYSISACTIVEX:

57
Reporting Measurement Results

Dimension Report Linear:

Dimension Report Linear2 (Surfer NT Style Control):

Dimension Report Radial:

58
About the Reporting and Form Editors

FeatureAnalysisActiveX:

The PC-DMIS ActiveX control that is not related to feature analysis is:

DataFileFormatControl
This control allows the interpretation of .dat files (logo.dat, elogo.dat, and
header.dat) in your template-based reports. See "Some PC-DMIS ActiveX
Controls" and "Using .DAT Files in Generated Reports".

As with any other object, the PC-DMIS ActiveX object also contains properties, both
standard and unique, that you can modify using the Properties dialog box. The topic
below contains information on accessing those properties.

Accessing an ActiveX Object’s Methods and Properties from Basic

If you have added a control, for example, an ActiveX calendar control and called it
MSCAL, you can access its events and properties through the property sheet just like
any other object. In this case, since it is an ActiveX object, a new section of properties
will appear called ActiveX. It contains a user-accessible list of variables and properties
with their default values.

To set properties for the ActiveX control inside the VBS Mini-Editor for an event
handler, type the name of the control, in this case, MSCAL. (with the period). A window
appears allowing the variables and methods to be accessible. Select the X from the list.
Another popup window will appear listing a set of internal editable variables for the
ActiveX control.

See "Using PC-DMIS ActiveX Controls" for information on the properties of the different
PC-DMIS ActiveX controls.

Arc Object

59
Reporting Measurement Results

The Arc object inserts an elliptical arc into the template or form. A default arc doesn't
have a fill color and has a beginning angle of 0 degrees and an ending angle of -90
degrees.

Along with the ability to resize the object, add a fill color, add a border color, and change
other attributes, the following editable properties are included for arc objects:

Angle1
This number sets the start angle for the arc. The default is 0 degrees.

Angle2
This number sets the end angle for the arc. The default is -90 degrees.

IsWedge
If set to NO (the default), PC-DMIS draws a filled arc without a wedge, like this:

If set to YES, PC-DMIS draws a filled arc with a wedge like this:

AnalysisWindow Object

The AnalysisWindow object is used to insert a PC-DMIS Graphical Analysis window


into a label template or into a custom report. Then, in the Report window, PC-DMIS
displays a graphical analysis of dimensions that use a report template, using the label
template with an analysis object in it.

60
About the Reporting and Form Editors

Report Window Using the Analysis Object

For information on the Analysis window, see "Inserting Commands Related to the
Analysis Window" in the "Inserting Report Commands" chapter.

The AnalysisWindow object only functions with Feature Control Frame


dimensions. It does not function with Legacy dimensions.

Manipulating the Object

You can double-click on this object to activate it in the Report window. This lets you
manipulate its display in the Report window on the fly. Once activated, you can use your
mouse wheel to zoom in or out on the object's graphical display and change its rotation.
Double-clicking outside of the object deactivates it. You can also right-click on the object
in the Report window to access the Graphical Analysis Options dialog box described
below.

If you need to revert a rotated graphical display in the object back to its original
orientation, right-click on the object, and select Restore View from the View menu on
the shortcut menu. This restores the orientation of the displayed graphical information in
the object to its original vector.

61
Reporting Measurement Results

Restore View menu item

The other menu items in the View menu, Flip Horizontal and Flip Vertical, flip the
horizontal or vertical orientation of the object.

Using with Point Info Boxes in Custom Reports

When adding an AnalysisWindow object to a custom report, you can use the following
two properties to control what point information is displayed and how it should look by
defining the label template to use:

• PointInfoLabel - This property displays a Browse Files dialog box, showing the
label templates in your Reporting subdirectory. You can use this dialog box to
select the label template you would like PC-DMIS to use when creating Point Info
boxes inside of the AnalysisWindow object. Once selected, the property will
display the label name and any Point Info boxes that exist within the
AnalysisWindow object will be immediately updated.

PC-DMIS remembers the selected template and uses it for subsequent


AnalysisWindow objects that are added into the Custom Report editor. The
defined template is also stored in the LastUsedPointInfoLabel registry entry
under the Reporting section of the PC-DMIS Settings Editor.

If you do not define any label template in this property, any Point Info boxes used
are generated the same as if you had dragged a PointInfo object onto the
Custom Report editor. In that case, it does not use a label template, but is created
internally.

Some label templates to consider using are: ga_point_info.lbl, ga_point_info2.lbl,


and ga_point_info_devonly

To clear this property, open the Browse Files dialog box, remove the filename
listed in the File name box, and click Cancel.

• SelectPointInfo - This property displays the Edit Point Info dialog box. That
dialog box allows you to create Point Info boxes inside the AnalysisWindow
object's window. This dialog box comes in two different styles depending on

62
About the Reporting and Form Editors

whether or not you have a label template defined in the PointInfoLabel


property.

If you do not have one defined, then the standard Edit Point Info dialog box
appears:

Edit Point Info dialog box

If you do have one defined, then a slightly different Edit Point Info with Label
dialog box appears:

Edit Point Info with Label dialog box

These dialog boxes are similar, but if you have defined a label, you can only
choose to hide or display leader lines using the Point info format area. This is
because the other items do not apply if you are using a customized label template.
63
Reporting Measurement Results

For information on the available items in either of these dialog boxes, see the
"Inserting Point Info Boxes" topic in the "Inserting Report Commands" chapter.

Changing Properties

To determine what this object displays, you can modify its many properties. You can
also use the (Settings Dialog) property to access the Graphical Analysis dialog
box inside the template editor. This dialog box lets you set many of the
AnalysisWindow object's properties. There are two tabs:

Graphical Analysis dialog box

Analysis Options tab

For a description of the options on this tab, see "Dimension Options" in the
"Inserting Report Commands" chapter. (The Template name near the top of the
tab only appears if you edit an AnalysisWindow object within the Report window.

64
About the Reporting and Form Editors

For information on editing directly within the Report window, see "Edit Graphical
Analysis".)

Reporting Options tab

For a description of the options on this tab, see the corresponding properties
under the "Available Properties" subtopic below.

Here are the properties that are tied to the options on this tab:

Line color (measured) - see "MeasuredLineColor"

Line style (measured) - see "MeasuredLineStyle"

Line color (nominal) - see "NominalLineColor"

Line style (nominal) - see "NominalLineStyle"

Line style (deviation) - see "DeviationLineStyle"

Show trihedron - see "TrihedronShow"

Min/Max ball size - see "MaxMinSize"

Minimum ball color - see "MinColor"

Maximum ball color - see "MaxColor"

Background color - see "BackColor"

Leaderline termination - see "LeaderTermination"

Show Deviation - see "DeviationShow"

Show Title - see "TitleShow"

Show Border - see "BorderShow"

Line Size - see "PenWidth"

Available Properties

The available properties for this object are listed below:

65
Reporting Measurement Results

All properties are used in Custom Reports unless otherwise stated. Those
properties followed by an asterisk (*) are also used in Report Template Builder.

(Settings Dialog) *
Displays the Graphical Analysis Options dialog box for the selected
AnalysisWindow object.

Arrow Best Value


Defines the number of best deviations for which to display arrows.

Arrow Density Options


Determines how to handle arrow density.

0 - by Percent - This uses the percentage defined in the Dimension


Analysis Options dialog box's Arrow density slider.

1 - by Worst - This uses the Arrow Worst Value property.

2 - by Best - This uses the Arrow Best Value property.

Arrow Worst Value


Defines the number of worst deviations for which to display arrows.

ArrowHeads *
Same as the Show Arrow Heads check box in the dialog box.

AutoScaleToFit
Scales the information being analyzed so it fits within the boundaries of the object.

BackColor *
Common Properties

BorderShow *
Shows or hides the AnalysisWindow object's border.

Bottom *
Common Properties

CadNominalStepValue
This defines the density of the points projected along the polyline to the CAD
interpolation for the points inserted from the CAD model in the
GenerateCadNominal property.

66
About the Reporting and Form Editors

CircularityMaxMinDiameters *
Same as the Show Best Fit, Max Inscribed, and Min Circumscribed Diameters
check box in the dialog box.

DeviationLineStyle
Defines the deviation line style.

Cylinder - Deviation lines are drawn as a cylinder terminated with an


arrowhead.

Line - Deviation lines are drawn as simple lines.

DeviationShow
Shows or hides the deviation lines. By default these are drawn as arrows.

Enable *
Common Properties

GenerateCadNominal
This generates a smoother nominal polyline by projecting additional points onto
the CAD model as needed in order to see a line that more closely matches the
CAD model. The density of these additional points can be increased or decreased
using the CadNominalStepValue property.

GridShow *
Displays the 3D grid-like backdrop for the Analysis window.

LabelOffset
This positions a user-defined Point Info label at the specified offset distance from
the hit location. The label to use is defined in the PointInfoLabel property.

LeaderTermination
Sets the termination location for any leader lines between Point Info boxes and
their associated point locations:

End of Arrow - The leader lines point to the end-of-arrow locations.

Nominal - The leader lines point to the nominal point locations.

Measured - The leader lines point to the measured point locations.

Left *
Common Properties

67
Reporting Measurement Results

MaxColor
Determines the sphere point color for maximum deviations. The default is red
(0.0.225).

MaxMin *
Same as the Show Max/Min Deviations check box in the dialog box.

MaxMinSize
Determines the diameter of the sphere point that marks the Max/Min points in the
AnalysisWindow object. The default is 0.

MeasuredLineColor
When lines are displayed between the measured hits, this determines the line
color used.

MeasuredLineStyle
When lines are displayed between the measured hits, this determines the style
used. You can choose Solid or Dashed.

MinColor
Determines the sphere point color for minimum deviations. The default is blue
(255.0.0).

NominalLineColor
Determines the color of the nominal graphical line.

NominalLineStyle
Determines the style of the nominal graphical line. You can choose Solid or
Dashed.

PC-DMIS Command Objects


Common Properties

PC-DMIS Reference
Common Properties

PenWidth
Sets the line size for the lines in the analysis object. The default is 0. The
maximum line width is determined by your graphics card and driver.

68
About the Reporting and Form Editors

PenWidth of 8 (top), and 0 (bottom)

PointInfoLabel
Selects the label template to use for Point Info boxes tied to the AnalysisWindow
object. Use-defined labels in this object cannot be moved except by using the
LabelOffset property.

ProfileMeasured *
Same as the Show Lines Between Measured Hits check box in the dialog box.

ProfileNominal *
Same as the Show Lines Between Nominals check box in the dialog box.

ProfileOptions *
Same as selecting one of the option buttons from the Profile Dimensions area in
the dialog box.

ProfileTolerances *
Same as the Show Tolerance Lines check box in the dialog box.

Right *
Common Properties

RulerElemX
Same as Number of elements XYZ boxes discussed in the Analysis Grid
Options dialog box.
69
Reporting Measurement Results

RulerElemY
Same as Number of elements XYZ boxes discussed in the Analysis Grid
Options dialog box.

RulerElemZ
Same as Number of elements XYZ boxes discussed in the Analysis Grid
Options dialog box.

Scale
Scales the Analysis window by a specific ratio. The format is n1:n2 where n1 and
n2 are two numbers. For example, a value of 1:3 would display the info in the
Analysis window at three times its normal size, and a value of 2:1 would display
the info at half its normal size. The property also displays the current zoom ratio if
you zoom using the mouse buttons.

The AutoScaleToFit property must be set to No for the Scale property


to work.

SelectPointInfo
Displays a dialog box so you can select the point information to display in Point
Info boxes in the AnalysisWindow object.

TitleShow *
Shows or hides the text of the items being dimensioned at the top of the
AnalysisWindow Object.

Top *
Common Properties

TPDiameters *
Same as the Show Diameters check box in the dialog box.

Transparent
Disables any color defined in the BackColor property and makes the object
transparent, showing other objects behind it.

TrihedronShow
Shows or hides the trihedron symbol. Alternately, you can select Ruler to show a
ruler along each axis.

Visible *
Common Properties

70
About the Reporting and Form Editors

Border Object

The Border object inserts a rectangular border into the template or form. Along with the
ability to resize the object, add a fill color, add a border color, and change other
attributes, the following editable properties are included for border objects:

HighlightColor
This sets the color used for the BorderStyle property.

BorderStyle
This sets the 3D highlight style of the object's border. Options include Normal,
3D, Sunken and Raised.

Image Object

The Image object allows you to insert a pre-created bitmap graphic into your template
or form. When you click this icon and drag a box in the editor, a dialog box opens.

Bitmap Dialog

• The OK button inserts the bitmap loaded into the dialog box into the form or
template.
• The Cancel button closes the dialog box without inserting any bitmap.
• The Copy button copies a bitmap to the Clipboard that you have already loaded
into this dialog box through the Load button.

71
Reporting Measurement Results

• The Paste button pastes a copied bitmap graphic from the Clipboard into the
dialog box. After you paste a graphic you can select the RLE check box to
compress the graphic when it's saved with the report.
• The Load button loads a graphic image (bitmap or JPEG file) into the dialog box.
After you load the graphic, you can select the Link check box to link the bitmap
to the template or form by its directory path. This means if the graphic gets
updated, it will appear in its updated form inside the template or form.
• The Clear button clears the loaded bitmap out of the dialog box.
• The Transparent list specifies one color within the bitmap to make transparent.

Along with the ability to resize the object and change other attributes, the following
editable properties are included for bitmap objects:

Bitmap
This contains the file name for the bitmap.

Layout
Center, Left, or Right is the alignment of the bitmap within the rectangle.

Stretch expands or shrinks the graphic to fit the size of the box.

Size to Fit automatically expands the rectangle size to fit the size of the
graphic.

Button Object

The Button object inserts a button control into a form. You can choose the action the
form will take when the button is clicked by modifying the ButtonType property.

Along with the ability to resize the object, change colors, and change other attributes,
you can further customize button objects by using these properties:

Default
This determines how buttons will respond when you press the Enter key.

YES - The button responds to a pressed Enter key even if another button has
the focus.

NO - If Enter is pressed only the button that has the focus will respond.
72
About the Reporting and Form Editors

ButtonShape
This determines the look of the button. Options include:

0 - Normal: Changes shape to a standard button.

1 - Property tab Inactive: Changes shape to an unselected


property sheet tab.

2 - Property tab Active: Changes shape to a selected property sheet


tab.

Text
This determines the text that appears on the button.

Bitmap
This places a bitmap of your choice on top of the button face. It uses the same
dialog box and properties as described in the "Bitmap Object".

Layout
This determines the position of the bitmap or text on the button's face. The values
include:

0 - Center

1 - Left

2 - Right

3 - Top

4 - Bottom

ButtonType
This determines the action a button will take when it's clicked.

0 - Cancel: Closes the form and does nothing.

1 - EventClick: Executes a C++ or VBScript action.

2 - Goto: Goes to the Multi Document Interface (MDI ) associated file.

3 - Help: Invokes the WinHelp() function using the HelpContextID


property to open the proper topic.

4 - OK: Records changes and closes the form.

73
Reporting Measurement Results

5 - Record: Records changes and keeps the form open.

GotoPath
This determines the MDI associated file the form will go to when the button is
clicked. This is mostly used to implement property sheet-like controls.

CadImageObject

The CadImageObject lets you display the CAD image inside of a label template or a
form. When you select this item and drag a box in the editing environment, PC-DMIS
inserts a CadImageObject into the editor, and the object displays a dummy CAD model
image.

Label Template Editor showing an inserted CadImageObject

How you size the object in the editing environment determines the size of the object
when actually displayed in the Report window or executed form.

The CadImageObject contains these properties:

Standard

Bottom
Defines the bottom location for the object in pixels from the top of the editor.

Left
Defines the left location for the object in pixels from the left of the editor.

74
About the Reporting and Form Editors

Right
Defines the right location for the object in pixels from the left of the editor.

Show Border
Shows or hides the object's border.

ON - Displays a border around the object.

OFF - Does not draw a border.

Top
Defines the top location for the object in pixels from the top of the editor.

GraphicsOptions
Determines whether to hide or show labels on the CAD image.

0 - None - Doesn't show labels.

1 - Labels - Shows labels.

Hide all measured features


Shows or hides features on the CAD image.

0 - No - Shows features.

1 - Yes - Hides features.

2 - Use registry setting - (Default) Uses the registry default.


This can override the HideAllMeasuredFeaturesOnReport
registry entry located in the Reporting section of the PC-DMIS
Settings Editor.

Hide all points


Shows or hides point features on the CAD image.

0 - No - Shows point features.

1 - Yes - (default) Hides point features.

2-Use registry setting - Uses the registry default. This can


override the HideAllPointsOnReport registry entry located in the
Reporting section of the PC-DMIS Settings Editor.

TrihedronShow
Shows or hides the trihedron on the CAD image.

75
Reporting Measurement Results

0 - No - (default) Hides the trihedron.

1 - Yes - Shows the trihedron.

Advanced

(Object Code)
Defines the object's unique name.

Enable
Determines whether or not this object is enabled for modification in the form
or template.

YES - Enables the object for modification.

NO - Does not enable the object for modification.

Visible
Determines whether or not this object is visible in the form or template.

YES - Shows the object.

NO - Hides the object.

Events

EventReportData - This is the event that pulls report data from PC-DMIS
into the template or form.

CadImageObject on Labels

You can use the Rules Tree Editor dialog box to display the label template in a report
template for a particular dimension or feature. In such a case, the Report window
displays the portion of the CAD model that contains that dimension or feature.

76
About the Reporting and Form Editors

Report window showing a CadImageObject next to each displayed dimension

You can scale, scale to fit, rotate or translate this CAD image from the Report window.
To do this, double-click on the CAD image to make it editable, and then manipulate the
image just as you would the model in the Graphic Display window. To return to the
Report window, storing your changes, double-click outside of the object.

CadImageObject on Forms

When it is used on a form, the CadImageObject is bound to the current viewset when
PC-DMIS executes the form command. Once you execute the form (CTRL + E) or the
measurement routine that calls the form, you cannot modify the CadImageObject.

77
Reporting Measurement Results

Form window showing a CadImageObject during measurement routine execution

For additional information on forms, see the "Creating Forms" topic in this chapter.

CadReportObject

The CadReportObject (CRO) lets you view your CAD drawing inside a finished report.
When you initially drop the CRO into a report template, PC-DMIS automatically
launches the Label Layout Wizard. After using this wizard to position the labels you
want PC-DMIS to use, you will see a dummy graphic of the Hexagon test block, and if
no rules are defined, dummy labels as well. It will look something like this:

78
About the Reporting and Form Editors

A sample CRO inserted into a report template

Remember, these dummy items are simply representations of what you want on your
report. In the actual Report window, it shows the actual CAD model. The labels display
a picture of the label template defined by the first rule in the rule tree of the CRO. If the
label is not associated, and no rules apply, it draws the dummy label image.

How it Works in the Report Window:

In the Report window, your CAD display initially appears exactly as shown in your
Graphic Display window when it finishes executing your measurement routine or at the
time you redraw your report, except that it does not zoom in any closer. If you make
modifications to a CRO in the Report window, PC-DMIS retains those changes to the
CAD image on the report—even after subsequent measurement routine executions—
until you right-click on the CAD view(s) inserted into your report and select Remove
Object Modifications or until you select File | Reporting | Clear Template
Associated Data.

While your Report window often shows your entire CAD drawing, it only shows labels
and leader lines for those features you have specified in the Rule Tree Editor. For
example, if your measurement routine has four measured circles and two measured
lines, yet in the Rule Tree Editor your CRO displays labels only for the measured
circles, then the report only shows label information for those circles, even though you
may have measured the lines as well in your last execution.

Also, if a CRO is configured to display—using the Label Count list on the Label Layout
Wizard—a fewer number of labels than the number of features it is specified to report
on in the Rule Tree Editor, then the Report window displays additional instances of
your CAD drawing on additional pages in the Report window. These additional images
show leader lines and labels to any remaining features. This is especially helpful if your
labels have a lot of information that may make your report look cluttered if you have
more than one or two labels around a part drawing.

79
Reporting Measurement Results

If you're using viewsets, your CAD display appears exactly as shown in your
viewsets. PC-DMIS inserts a new CAD display on a new page of the report for each
viewset encountered during execution. For information on viewsets, see "Working with
Viewsets".

Rotating, Moving, and Zooming the CRO CAD Image

You can change the CRO CAD image orientation and zoom level in the Report window,
or move it to a new location.

• To rotate the image, double-click on the object to "activate" it. Once activated,
click and hold the wheel button. As you do this, drag the mouse. You can also
press Ctrl and right-click while dragging the mouse.
• To zoom in or out of the image, double-click the object to "active" it. Once
activated, rotate your mouse's wheel button to zoom in and out.
• To move the CRO, right-click the object to select it. Once selected, click the
object and drag the mouse.

To cancel zoom or rotation changes, press the Esc key. The CRO is "deactivated"
without applying your changes.

To save zoom or rotation changes, double-click outside of the CRO. The CRO is
"deactivated", and the CAD image uses the new orientation and zoom level. If you are
using the Feature-based label layout on the CRO, the entire report is reloaded with the
new orientation and zoom level applied to the CAD image. If the CRO is from a
SNAPSHOT command, PC-DMIS applies these same changes to your SNAPSHOT
command in the Edit window.

To save movement changes, click outside of the selected object.

To remove pan, zoom, and rotate modifications for the CRO, right-click on the object in
the Report window, and choose Remove CAD Report Object Pan/Zoom/Rotate
MOD. Other mods (such as section cuts, various label definitions, solid or wire displays,
and so forth) are not affected.

Switching Between Solid and Wireframe Modes

• In the Report window, you can do this by right-clicking the CRO and selecting the
Wireframe menu item from the shortcut menu.

80
About the Reporting and Form Editors

• In the Report Template Editor, you can do this by right-clicking the CRO,
accessing the Properties dialog box and setting the Wireframe property to
either YES or NO.

Additional Functionality in the Custom Report Editor

In the Custom Report Editor, if you activate a CRO, the View Setup icon on the
Graphic Modes toolbar becomes available for selection. The Edit | CAD Operation |
View Setup menu item also becomes available. Clicking this icon or selecting the menu
item displays the View Setup dialog box. In this context, you can use this dialog box to
only modify the display of the CRO just as you would manipulate the view of the
Graphic Display window normally. See "Setting Up the Screen View" for information on
using the View Setup dialog box to define views.

• Choosing Wireframe or Solid:


You can display your CRO in Custom Report Editor as either a solid or wireframe
by using the View Setup dialog box and marking or clearing the Solid check
box. Alternately, with the object only selected but not activated, you can right-
click on the CRO, select Properties from the shortcut menu and then set the
Wireframe property to either YES or NO. PC-DMIS toggles between a solid or
wireframe in your custom report.
• Viewing Levels:
You can use the View Setup dialog box to select specific levels of CAD elements
to be applied to the object in the Custom Report Editor. The Levels area lists any
predefined CAD levels.

Levels area showing three levels

Select one or more levels and click OK, PC-DMIS displays the selected levels on
the selected CRO in your custom report. For information on creating your own
levels, see "Working with CAD Levels" in the "Editing the CAD Display" chapter.

• Mirroring the CAD:


PC-DMIS lets you mirror the CAD image contained in that object in the Custom
Report Editor. To do this, select the CRO, select Edit | CAD Operation | Mirror.
The Mirror CAD dialog box appears:

81
Reporting Measurement Results

Mirror CAD dialog box

This dialog box lets you create a mirror image of the part. Select the plane (axis)
in which you want to mirror the part, and click OK. PC-DMIS displays the mirrored
CAD model on the selected CRO. See "Transforming a CAD Model" for additional
information on Mirroring CAD in the Graphic Display window.

See "Creating Custom Reports" for information on custom reports.

Using Image Caching

PC-DMIS lets you cache your part's image once and use the image cache later in
reporting contexts instead of always using your measurement routine's associated .cad
file. You may find this useful in situations where you have a very large .cad file that
takes a long time to load into the Graphic Display window. Once you cache your images
for a particular report you won't need your .cad file to view that report.

To cache your image:

1. Close PC-DMIS and open the PC-DMIS Settings Editor.


2. Under the Reporting section, set the UseImageCachingScheme registry entry
to 1.
3. Close the PC-DMIS Settings Editor and restart PC-DMIS.
4. Load the measurement routine and the .cad file as usual.
5. Open the Report window and select a report template that uses the CRO.
6. Generate the report.
7. Make any desired modifications to the CRO items used in the report.
8. Print your report.

This process caches the images used in this particular report. Now if you delete (or
rename) your .cad file to speed up the measurement routine opening process, this
same report uses your cached images. Note that other reports that use the CRO are not
cached however, and you need to load the .cad file as usual.

82
About the Reporting and Form Editors

Properties:

Many of the properties in this table are covered in more detail in the "Label Layout
Wizard" topic.

AutoZoom
Determines if the object automatically zooms and focuses attention on only that
portion of the CAD model where label objects are currently displayed.

Draw wires in shaded mode


This determines whether or not PC-DMIS displays a wireframe of the CAD object
on top of the shaded image when viewing the CAD model in a solid surface view.

Label Layout
This opens the Label Layout Wizard. This lets you quickly layout multiple labels
around your CAD drawing. See "The Label Layout Wizard" for more information.

Leader Line ArrowHeader Height


Defines the height of the arrow on the leader line.

Leader Line ArrowHeader Style


Defines the style of the arrow on the leader line.

Leader Line Color


Defines the color of the leader line.

Leader Line ending at two features for angle


Determines if the leader line splits to point to both features.

Leader Line ending at two features for distance


Determines if the leader line splits to point to both features.

Leader Line Feature Mode


Determines whether the leader line points to the feature's centroid or to the usual
drawn location.

Leader Line Style


Defines the style of the leader line.

Leader Line Termination


This draws the leader line from the label to either the Measured feature on the
CAD or the Nominal feature on the CAD. See description in the Label Layout
Wizard.

Leader Line Width


This defines the width of the leader line in pixels.

83
Reporting Measurement Results

RuleTree
This opens the Rules Tree Editor dialog box. This dialog box lets you define
conditions and actions for this object. See "About the Rule Tree Editor" for more
information.

ShowBorder
This draws or hides a border around the CRO.

Single Click Rule Tree


This lets you browse and select a label template that PC-DMIS displays when you
click on a label from the Report window.

TrihedronShow
Shows or hides the trihedron on the CAD image.

0 - No - (default) Hides the trihedron.

1 - Yes - Shows the trihedron.

Wireframe
This property lets you show the CRO in your report in either a wireframe (if set to
YES) or solid surface view (if set to NO).

Hide all measured features


Shows or hides features on the CAD image.

0 - No - Shows features.

1 - Yes - Hides features.

2 - Use registry setting - (Default) Uses the registry default. This


can override the HideAllMeasuredFeaturesOnReport registry entry
located in the Reporting section of the PC-DMIS Settings Editor.

Hide all points


Shows or hides point features on the CAD image.

0 - No - Shows point features.

1 - Yes - (default) Hides point features.

2-Use registry setting - Uses the registry default. This can override
the HideAllPointsOnReport registry entry located in the Reporting
section of the PC-DMIS Settings Editor.

84
About the Reporting and Form Editors

Colormap is own page


Shows a colormap alone on its own page or with other objects. This property
works with Cloud of Points (COP) Surface Colormaps; it does not affect Profile
dimensions that have an embedded colormap.

0 - No - The colormap resides with other objects, and the report does not
add a new page with only the colormap.

1 - Yes - (default) The report adds an additional page before the usual
colormap page with only the colormap and its color key.

The Label Layout Wizard

Label Layout Wizard

The Label Layout Wizard is a tool that lets you quickly arrange multiple labels around
your CAD drawing in the Report Template Editor and determine how the leader lines

85
Reporting Measurement Results

are drawn. In the Report Template Editor, this wizard appears automatically whenever
you insert a CadReportObject. It also appears when you select the (Settings Dialog)
property for a CadReportObject.

You can also utilize this wizard in the Report window. To access it, right-click on the
CadReportObject in the Report window and select Edit Object. In the Report window,
the wizard displays the real part model used with your measurement routine. In the
Report Template Editor, however, it displays the Hexagon test block as a filler model.

Any changes you make inside this wizard will automatically change the appearance of
the CadReportObject.

This wizard contains these two main parts:

• Layout Preview area


• Settings area

Layout Preview area

The Layout Preview area lets you preview how the layouts will appear around the
CadReportObject.

Depending on how you want your labels to appear, you can rotate labels along either a
rectangular or an elliptical path by clicking on the square, white handle, located at the
center of the rectangle or ellipse and dragging it to a new location. You can click and
drag any of the outer white handles to size this rotation path.

86
About the Reporting and Form Editors

If you want to relocate your part drawing, click on it and drag it to a new location.

The following options are available:

Layout Style list


The drop-down list lets you control the spacing and rotate paths for the labels in
the Layout Preview area. You can choose between these options:

Rectangular - Distributed - This creates a rectangular path that labels


rotate around. The labels are distributed equally around the rectangle.

Rectangular - Packed - This creates a rectangular path that labels rotate


around. The labels are close together along one side of the rectangle.

Elliptical - Distributed - This creates an elliptical path that labels rotate


around. The labels are distributed equally around the ellipse.

Elliptical - Packed - This creates an elliptical path that labels rotate around.
The labels are close together along the ellipse.

Feature Based - This setting automatically places in the Report window all
the feature labels around the part model in locations close to each feature's
location. This is useful when you have, for example, a large amount of edge
points and you want to display all their labels in one CAD drawing. Selecting
this option disables the Label Count box and enables the Feature Based
Option area where you can define the minimum leader line length.

Feature Based - Restricted - This acts the same as Feature Based except
that it enables the Label Count box, allowing you to restrict the number of
labels that will appear in the object in the Report window. If the object needs
to display more labels than you have defined, the extra labels will appear in
additional instances of the CAD drawing on new pages.

Leader Line Termination area


This area lets you choose where the leader lines from the labels will terminate on
the CAD drawing.

Measured - This option terminates the leader line at the measured value's
position.

87
Reporting Measurement Results

Nominal - This option terminates the leader line at the nominal value's
position.

Use Feature Centroid - This check box terminates the leader lines to the
centroid of the feature.

At two features for angle - This check box draws a single leader line from
the label that then splits into two lines pointing to the two features making up
an Angle dimension.

At two features for distance - This check box draws a single line from the
label that then splits into two lines pointing to the two features making up a
Distance dimension.

Draw Color Ball - This check box draws a colored ball where the leader line
terminates. The color of the ball matches the tolerance color band for that
feature's value.

Ball Size - This list determines the size of the colored ball drawn where the
leader line terminates. It becomes enabled for selection when the Draw
Color Ball check box is selected. You can choose between small, medium,
and large. In addition, to define a more specific size, you can type a number
in this box. This reflects the diameter of the color ball in pixels.

88
About the Reporting and Form Editors

Ball Color by Dimension - This option colors leader line termination balls
with the dimension's deviation color for the worst reported axis.

89
Reporting Measurement Results

Ball Color by User - This option colors leader line termination balls with a
single color that you select. To set the color, click on the ... button and
specify the color using the Color dialog box.

Leader Line Style area


This area lets you define what leader lines look like in the report.

Line Style - Defines the line style:

• Solid
• Dash
• Dot
• Dash-Dot
• Dash-Dot-Dot

Line styles only work at the default line width of 1. Wider lines will
only use the Solid line style.

Line Width - Sets the line width in pixels.

Line Color - Defines the color of the line by setting RGB (Red, Green, Blue)
values, consisting by three numbers separated by periods. You can either
type in specific values for the colors, or you can select the ... item from the
list to access a standard Color dialog box and select your line color from
that.

Arrow Head - Defines whether or not the leader lines have Arrow Heads.

• None - Lines do not have arrow heads.


• Both - Lines have an arrow head at each end.

Arrow Width - Defines the width of the arrow head in pixels

Show Border check box


This check box draws or removes a border around the entire CADReportObject
inside the template editor or Report window.

Auto Zoom check box


This check box will automatically zoom in on the CAD display in the Report
window in such a way that it focuses the attention on only that portion of the CAD
model for which label objects are currently displayed.

90
About the Reporting and Form Editors

Feature Based Option area


This area becomes enabled when you select Feature Based or Feature Based-
Restricted. It contains two option buttons, mm and inch, and an Offset box. You
can use the Offset box to define the minimum leader line length used with the
labels. Depending on available room in the CadReportObject, the leader line
length may grow, but it will never go below this minimum value.

Label Count box


This changes the maximum number of labels a report's page will display. It
becomes disabled when you select Feature Based.

Label Size Options area


This area lets you switch between automatic or manual sizing of label objects. To
make your label objects a specific size, click on Enable Manual Sizing and type
in values in the Width and Height boxes.

Changing the labels sizes affects design purposes only. It does not
affect label sizes in the actual Report window.

This area only appears when using the wizard in the Report Template Editor.

Apply to page only check box


Applies the changes made in the wizard to just the current page.

Colormaps and the CadReportObject

Laser scanners can scan and store thousands of points. PC-DMIS can then create
colormap commands from these points. These colormaps can show deviations in a
colored overlay. In the report, it does this with the CADReportObject (CRO).

For information on colormap commands, see the "Surface Colormap" and "Point
Colormap" topics in the "PC-DMIS Laser" documentation.

For Standard Reports

The Report window shows a CRO on a new page for each marked colormap command.
These CROs show the cad image with the colormap overlay. The colormap command
defines what colormap appears.

91
Reporting Measurement Results

For Custom Reports

You can add your own CRO and then drag a specific colormap command onto it.

In this way you can still view the colormaps but keep measured features and
points hidden if Hide all measured features and Hide all points properties are set to
Yes.

• For surface colormaps, if you associate more than one surface colormap to a
CRO, it uses the last associated surface colormap.
• For point colormaps, you can combine point colormaps with other colormaps
(point or surface) and show them all.
• If you drag and drop the same colormap onto the CRO where it's already been
dropped, PC-DMIS removes that colormap from the CRO.
• If you do not associate any colormap with a CRO, PC-DMIS still attempts to
show a colormap for that CRO. When it runs the REPORT/CUSTOM command it
searches up from the insertion point. It uses the first colormap above the
REPORT/CUSTOM command for the CRO. For information on the
REPORT/CUSTOM command, see "The REPORT Command" in the "Inserting
Report Commands" chapter.

For an example of dragging and dropping onto a CRO in a Custom Report, see
"Dragging and Dropping Information into a Custom Report".

For information on Custom Reports in general, see "Creating Custom Reports".

CommandTextObject

The CommandTextObject merely acts as a container for a simple string of text that
gives an overview of a feature or dimension.

When you use a template with this object with actual report data, PC-DMIS will display a
string of text that shows, for a feature, the feature's text label, the feature's type, and
how many hits were used to measure the feature. For a dimension, it shows the
dimension's name and type and what units of measurement are used in the dimension.

A label that has only the CommandTextObject with actual report data might look
something like this when displayed in the Report window:

92
About the Reporting and Form Editors

Report of Circle Features Generated from a Label that Uses a CommandTextObject

Colors
Lets you change the colors of the text displayed. By default, PC-DMIS causes this
object to use the same colors scheme as used in the Edit window's Command
mode, so if you click this property PC-DMIS displays a message box asking if you
want to create an independent color set. Clicking Yes accesses the Color Editor
dialog box. You can then use this editor to define a new color scheme for the
selected CommandTextObject.

See "Defining Edit Window Colors" in "Setting Your Preferences" for information
on how to use the Color Editor.

Empty Lines In Text Mode


This determines the number of blank lines to add between dimensions when
dimensions are displayed as text.

Checkbutton Object

The Checkbutton object inserts a checkbutton object, or check box, into the form.
Check boxes, unlike option buttons, are never mutually exclusive. You can select as
many check boxes as desired (provided they are enabled for selection).
93
Reporting Measurement Results

Along with the ability to resize the object, change colors, and change other attributes,
you can further customize check boxes by using these properties:

AlignTextLeft
If set to YES, this moves the text to the left of the check box like this:

Text Here [ ]

If set to NO, this moves the text to the right of the check box like this:

[ ] Text Here

Bitmap
This allows you to specify a bitmap to use if OwnerDrawn is set to TRUE and if the
check box is selected.

Additionally, the specified bitmap must be the same shape as a standard check
box.

BitmapOffState
This allows you to specify a bitmap to use if OwnerDrawn is set to TRUE and if the
check box is not selected.

Additionally, the specified bitmap must be the same shape as a standard check
box.

HelpHotButton
Selecting YES shows a question mark help button next to the check box.

Clicking this button in run mode launches the PC-DMIS Online Help.

OwnerDrawn
This specifies how the form should draw the check box.

If set to TRUE, the check box gets drawn from a bitmap specified in the
Bitmap and Bitmap (Off) properties.

If set to FALSE, the check box is drawn normally.

TriState
Enables (if set to 1 - YES) or disables (if set to 0 - NO) a check box's third
state. Instead of just the checked or cleared states, this can add an additional third
state to allow for cases when a portion of a selected option is true.

94
About the Reporting and Form Editors

Text
The text specified here gets displayed on the check box control.

ComboBox Object

The ComboBox object inserts a combo list into your form. Using this list you can
display options to select when you click the list in run mode.

Along with the ability to resize the object, change colors, and change other attributes,
you can further customize this object by using these properties:

ComboType
This specifies the type of combo list. You can select either Droplist or
Dropdown.

FlexHorizontal or FlexVertical
When the view is resized when viewing the form in run mode, you can elect to
shift, expand, or keep objects proportional.

Selecting Shift moves the object to the right or down.

Selecting Expand enlarges the object right or down.

Selecting Proportional centers the object.

HelpHotButton
Selecting YES shows a question mark help button next to the check box.

Clicking this help button in run mode launches the PC-DMIS Online Help.

ListItems
This defines the list of items and the associated values (see the description of the
List Choices dialog box described in the "Radiobutton Object").

NumDropped
The number specified determines how many list items the form displays when you
click on the list in run mode.

95
Reporting Measurement Results

Sort
Selecting YES sorts the list items in alphabetic order.

UseColors
This determines whether or not this control should use colors specified in
BackColor and TextColor properties.

Dimension Color Key Object

The Dimension Color Key object is used to drop a color key directly into the template.
This color key depicts the colors that are used to represent the dimensional tolerance
zones for analysis and histogram objects.

To see how these tolerance zones are defined or to change the colors representing
each tolerance zone, see "Editing Dimension Colors" in the "Editing the CAD Display"
chapter. Note that the Decimal Places value discussed in that topic does not affect the
decimal places in the Dimension Color Key object here. That value only applies to the
color bar in the Graphic Display window. The decimal places for the Dimension Color
Key object is hard coded to three decimal places.

Sample Horizontal Dimension Color Key Object

96
About the Reporting and Form Editors

Sample Vertical Dimension Color Key Object

The following properties can be set:

BorderLines
This shows or hides the border line around the object.

LabelText
This shows or hides the overlay text on the color bar.

LimitsColor
This shows or hides the LIMITS color from the bar. This is the color used to draw
the tolerance limits (tolerance lines).

ShadowStyle
This sets the location of the 3D shadow on the resulting object. Available locations
are:

Top/Left, Bottom/Right, or None

97
Reporting Measurement Results

DimensionInfo Object

The DimensionInfo object acts as a container to hold individual dimension information


in your report.

How to Use in a Label Template

From the Label Template editor's Object Bar, you can add and size a DimensionInfo
object. Once you save the label template, you can use the Rule Tree Editor dialog box
for a new or an existing report template to specify the dimensions for which PC-DMIS
calls and displays that label template. For information on how to use the Rule Tree
Editor dialog box, see the "About the Rule Tree Editor" topic in this chapter.

How to Use in a Custom Report

From the Custom Report editor's Object Bar, you can drag and drop a DimensionInfo
object into the editor's canvas. The Dimension Info dialog box opens so that you can
choose a dimension to associate with the object.

Dimension Info dialog box

98
About the Reporting and Form Editors

From the dialog box, you can choose the dimension from the dimension list. Once you
click OK, PC-DMIS displays a table on your report that contains the dimension
information.

For complete information on how to use this dialog box to display dimension
information, see "Inserting Dimension Info Boxes" in the "Inserting Report Commands"
chapter.

Below are the properties specific to this object:

For most properties, you can set them from the Dimension Info dialog box.
You can open this dialog box at any time with the (Settings Dialog) property.

DimID
Defines the feature or dimension ID containing the hits that you want to display.

GraphOption
Defines if the graph is displayed and what it shows. The value can be one of the
following numbers:

0 - Hides the graph.


1 - Graphs the worst axes.
2 - Graphs each axis.

LocOrderA
A value greater than 0 displays the A location axis and orders it according to the
value given.

LocOrderAR
As above, except the AR (Area) axis is displayed and ordered.

LocOrderD
As above, except the D axis is displayed and ordered.

LocOrderForm
As above, except the Form axis is displayed and ordered.

LocOrderH
As above, except the H axis is displayed and ordered.

LocOrderL
As above, except the L axis is displayed and ordered.

99
Reporting Measurement Results

LocOrderPAng
As above, except the Polar Angle axis is displayed and ordered.

LocOrderPD
As above, except the PD axis is displayed and ordered.

LocOrderPRad
As above, except the Polar Radius axis is displayed and ordered.

LocOrderR
As above, except the R axis is displayed and ordered.

LocOrderRS
As above, except the RS axis is displayed and ordered.

LocOrderRT
As above, except the RT axis is displayed and ordered.

LocOrderS
As above, except the S axis is displayed and ordered.

LocOrderT
As above, except the T axis is displayed and ordered.

LocOrderUseDimAxes
As above, except only the dimension axes for the location are displayed.

LocOrderV
As above, except the V axis is displayed and ordered.

LocOrderWorst
As above, except the Worst axis of the location is displayed.

LocOrderX
As above except the X axis is displayed and ordered.

LocOrderY
As above, except the Y axis is displayed and ordered.

LocOrderZ
As above, except the Z axis is displayed and ordered.

OrderAuto
A value greater than 0 displays and orders the default information automatically.

100
About the Reporting and Form Editors

OrderDeviation
As above, except the deviation value is displayed and ordered.

OrderMaxMin
As above, except the maximum and minimum values are displayed and ordered.

OrderMean
As above, except the average of all the deviations is displayed and ordered.

OrderMeasured
As above, except the actual measured dimensions are displayed and ordered.

OrderNominal
As above, except the nominal values are displayed and ordered.

OrderNumberPoints
As above, except the number of points used to measure the feature or dimension
are displayed and ordered.

OrderOutTol
As above, except the out of tolerance value is displayed and ordered.

OrderStdDev
As above, except the standard deviation is displayed and ordered.

OrderTolerances
As above, except the tolerances are displayed and ordered.

ShowDimensionID
A value of 1 displays the dimension ID. A value of 0 hides it.

ShowFeatureID
A value of 1 displays the feature ID. A value of 0 hides it.

ShowHeadings
A value of 1 displays the row and column headings. A value of 0 hides it.

TPOrderD1
A value greater than 0 displays and orders the diameter/width value of the first
datum.

TPOrderD2
As above, except the second datum is displayed and ordered.

TPOrderD3
As above, except the third datum is displayed and ordered.

101
Reporting Measurement Results

TPOrderDF
As above, except the diameter of the feature is displayed and ordered.

TPOrderForm
As above, except the integrated form dimension is displayed and ordered.

TPOrderPA
As above, except the Polar Angle of the position is displayed and ordered.

TPOrderPR
As above, except the Polar Radius of the position is displayed and ordered.

TPOrderTP
As above, except the position tolerance and its associated deviation are displayed
and ordered.

TPOrderUseDimAxes
As above, except only the position dimension axes are displayed.

TPOrderWorst
As above, except only the worst axis of the position is displayed.

TPOrderX
As above, except the X axis of the position is displayed and ordered.

TPOrderY
As above, except the Y axis of the position is displayed and ordered.

TPOrderZ
As above, except the Z axis of the position is displayed and ordered.

EditBox Object

The EditBox object inserts an editable box into the form. You can use this object with
Visual BASIC scripting to collect information from those running the form.

Along with the ability to resize the object, change colors, and change other attributes,
you can further customize this object by using these properties:

102
About the Reporting and Form Editors

Alignment
This aligns the text within the object. Available alignments are: Left, Center,
and Right.

ReadOnly
Setting this to YES makes the text read-only and therefore not editable when the
form is in run mode.

BorderDrawn
Setting this to YES draws a border around the control.

CaseOrPassword
This sets the style of the text in the box. You can select one of the following:

0 – None: doesn't change the display of the text.


1 - Lower Case: displays the case of the text in the box to all lower case.
2 - Upper Case: displays the case of the text in the box to all upper
case.
3 – Password: masks each character of the text with an asterisk.

UseColors
If set to YES then the colors specified in BackColor and TextColor are
displayed.

HelpHotButton
Selecting YES shows a question-mark help button next to the check box.

Clicking this help button in run mode launches the PC-DMIS online Help.

EditDblBox Object

The EditDblBox object inserts an edit box in the form that accepts variables of double
types. This has all the properties of the EditBox object (see "EditBox Object") with the
addition of the MinimumEq and MaximumEq properties:

MinimumEq
Minimum equation (this value can be a set constant number, a value evaluated
from a simple equation, or a returned value from a VBScript).

103
Reporting Measurement Results

-$, $, CONST

MaximumEq
Maximum equation (this value can be a set constant number, a value evaluated
from a simple equation, or a returned value from a VBScript).

-$, $, CONST

EditLongBox Object

The EditLongBox object inserts an edit box in the form that only accepts Long
numerical values. This has all the properties of the EditBox object (see "EditBox
Object") with the addition of the MinimumEq and MaximumEq properties:

MinimumEq
Minimum equation (this value can be a set constant number, a value evaluated
from a simple equation, or a returned value from a VBScript).

-$, $, CONST

MaximumEq
Maximum equation (this value can be a set constant number, a value evaluated
from a simple equation, or a returned value from a VBScript).

-$, $, CONST

Ellipse Object

The Ellipse object inserts an ellipse into the form or template. The default ellipse is a
circle with the same distance from the centroid of the circle to all points along the
circumference; however, you can easily stretch the circle to form an ellipse.

Along with the ability to resize the object, add a fill color, add a border color, and change
other attributes, the following editable property is included for ellipse objects:

104
About the Reporting and Form Editors

HatchStyle
This property sets the type of pattern (or hash) to use to fill the resulting polygon. The
available patterns are:

Horizontal

Vertical

Diagonal

Reverse Diagonal

Cross

Diagonal Cross

Frame Object

The Frame object inserts a frame into the form. You'll generally use this object to set off
groups of similar options when designing your own dialog boxes inside your form.

Along with the ability to resize the object, add a fill color, add a border color, and change
other attributes, the following editable properties are included for frame objects:

105
Reporting Measurement Results

BorderColor
This sets the color of the border.

HiliteColor
This sets the color used for the BorderStyle property when you use Raised or
Sunken.

BorderStyle
This sets the 3D highlight style of the object's border. Options include Normal,
3D, Sunken, and Raised.

BorderWidth
This sets the width of the object's border in pixels.

Text
Text typed here determines the name used for the frame's title.

Alignment
This aligns the text within the object. Available alignments are Left, Center, and
Right.

Gauge Object

The Gauge object inserts a gauge object into your form, label template, or custom
report. This object is not valid in the Report Template Editor.

Default Gauge Object

If the object's width is larger than the height, the percentile bar moves horizontally.

If the object's height is larger than the width, the percentile bar moves vertically.

Along with the ability to resize the object, change colors, and change other attributes,
you can cause the object's percentile bar to move by using these properties in
conjunction with PC-DMIS commands or Visual BASIC code:

ValueEq
Value equation.

106
About the Reporting and Form Editors

This is the current value of the gauge object. Once it is evaluated against the
minimum and maximum ranges set in MinimumEQ and MaximumEQ, it displays a
percentage number on the gauge.

It can be a set constant number, a value evaluated from a simple equation, or a


value returned from a VBScript.

-$, $, CONST

MinimumEq
Minimum equation.

This defines what the 0% value is. If a value of 5 represents 0 percent on the
gauge, you would set this property to 5.

This value can be a set constant number, a value evaluated from a simple
equation, or a value returned from a VBScript.

-$, $, CONST

MaximumEq
Maximum equation.

This defines what the 100% value is. If a value of 10 represents 100 percent, you
would set this property to 10.

This value can be a set constant number, a value evaluated from a simple
equation, or a value returned from a VBScript.

-$, $, CONST

ShowText
This shows or hides the percentage number in the gauge.

Example of Using PARAM to Change the Gauge's Value

You can also use the REPORT/CUSTOM command with PARAM statements to change
a gauge's value. Suppose you want to change the gauge percentage based on an input
comment in PC-DMIS.

1. Add the object into one of the editors and size it as needed.
2. Right-click on it, choose Properties, and make a note the Object Name
property.
3. Inside PC-DMIS, add code similar to the following:

C1=COMMENT/INPUT,NO,FULL SCREEN=NO,

107
Reporting Measurement Results

Type a percentage:
CS1=REPORT/CUSTOM, FILENAME=MyCustomReport, Section=-1
PARAM/GAUGE1.VALUE=C1.INPUT
PARAM/=
ENDCUSTOM/

Executing the above code stores a number value from the input comment into the
C1.INPUT variable. It then looks for a custom report named "MyCustomReport".

Notice the PARAM statement. It modifies an object named Gauge1. It then uses a
VALUE property to set the gauge's value equal to the value stored in the C1.INPUT
variable.

Example of Using BASIC Scripting to Dynamically Change the Gauge's Value

You can also use BASIC code in the VBS Mini-Editor to dynamically change the value
of the gauge at a given time. Suppose you want to create a form that moves the gauge
from 0 to 100 percent based on how closely a circle's diameter approaches its minimum
and maximum allowed tolerances. You can do this by following this procedure:

Step 1 - Create the Form

1. Create a new form and make sure it's in edit mode. First, you will need to create
a variable named MYDIAMETER that will take the diameter value of the circle.
2. Right-click on the grid and make sure The Frame / The View is selected from the
object list on the Properties dialog box.
3. Expand the Advanced heading in the Properties dialog box. Select the value for
the LocalVariables property. The Local Variables dialog box appears.
4. Click the Add button to add a new variable. Select Double from the Type list. In
the Name box, type MYDIAMETER. Leave the Value as 0.

Local Variables dialog box showing the MYDIAMETER variable

108
About the Reporting and Form Editors

5. Click OK to return to the Properties dialog box. The MYDIAMETER variable is


now added to the form.
6. Next, insert a Gauge object into the form.
7. Select the Gauge object and place and size it as desired. The vertical distance is
the total distance the percentile bar can travel.
8. From the Properties dialog box, ensure that the added Gauge object is selected.
9. Again, under the Advanced heading on the Properties dialog box, click the
MaximumEq property. The VBS Mini-Editor appears; much of it is unavailable
for selection.
10. Select CONST from the list. This value allows you to define the gauge's 100%
value.
11. Type the maximum allowed value for the circle's diameter. This example
measures a one inch diameter circle with an allowed tolerance of .010. So the
maximum allowed value would be 1.010.
12. Click OK to return to the Properties dialog box.
13. Click on the MinimumEq property. The VBS Mini-Editor re-appears. This value
allows you to define the gauge's 0% value.
14. Select CONST from the list.
15. Type the minimum allowed value for the circle's diameter. Again, since this
example measures a one inch diameter circle with an allowed tolerance of .010,
the minimum allowed value would be 0.990.
16. Click OK to return to the Properties dialog box. Now you need to give the actual
value of the gauge the diameter of the circle.
17. With the gauge object still selected from the Properties dialog box, under the
Advanced heading, select the ValueEq property. The VBS Mini-Editor appears;
much of it is unavailable for selection.
18. In the list on the left, select + EQ ($).
19. In the list on the right, select the <MYDIAMETER>.

Using the VBS Mini-Editor to set the value of the gauge object

109
Reporting Measurement Results

20. Click OK to close the VBS Mini-Editor.


21. Save the form. This example gives the form the name of gaugetest.form.

Step 2 - Create a Generic Circle Feature

1. You will now create a generic circle feature inside PC-DMIS.


2. Select PC-DMIS's Edit window and place it in Command mode.
3. Insert a generic feature by typing GENERIC and pressing TAB. Initially, a generic
point feature appears in the Edit window with the feature's ID selected.
4. Press F9 to access the dialog box for this generic feature.
5. In the Feature Type area, select Circle.
6. In the Data Type area, select Nominal Values.
7. Type a name for the circle in the Feature Name box. This example uses CIR1 for
the feature name.
8. Type the XYZ and IJK values for CIR1.
9. Select the Diameter option and give CIR1 a nominal diameter value of 1.
10. Change any other options as desired and then click OK when finished. The
generic circle in your Edit window should look something like this:

CIR1 =GENERIC/CIRCLE,DEPENDENT,RECT ,OUT,$


NOM/XYZ,1,1,0.95,$
MEAS/XYZ,1,1,1,$
NOM/IJK,0,0,1,$
MEAS/IJK,0,0,1,$
DIAMETER/1,0

Step 3 - Insert an INPUT Comment and Modify Generic Circle

1. Move your cursor before the CIR1 feature and insert an input comment that will
take a measured diameter value (since this example is done in Offline mode, the
"measured" values are inserted manually). For example:

C1 =COMMENT/INPUT,Please type CIR1's measured


diameter:

2. Now go to the command block for CIR1 and on the last line where it says
DIAMETER/1,0 change the second parameter, the measured diameter of 0, to
C1.INPUT. This assigns the value from the input comment to CIR1's measured
diameter.

110
About the Reporting and Form Editors

DIAMETER/1,C1.INPUT

3. Now move the cursor after the CIR1 feature and embed the saved form by
selecting the Insert | Report Command | Form menu option.

Step 4 - Insert a FORM/FILENAME Command and Execute

1. Type FORM and press tab to insert a FORM/FILENAME command block into the
Edit window.
2. Now in the FORM/FILENAME command where it says PARAM/=, place your
cursor immediately before the equals sign and type MYDIAMETER. Then move
the cursor immediately after the equals sign and type CIR1.DIAMETER. The
code to embed your form should look something like this:

CS1 =FORM/FILENAME= C:\PCDMIS35\GAUGETEST.FORM,


AUTOPRINT=NO
PARAM/MYDIAMETER=CIR1.DIAMETER
PARAM/=
ENDFORM/

3. Mark the newly added commands and then execute the measurement routine.
The diameter for CIR1 gets passed as a parameter into the form and the gauge
object's percentile dynamically changes depending on the circle's measured
diameter.

For example, if the measured diameter for CIR1 was .9987 you would get a form that
looks something like this:

111
Reporting Measurement Results

Sample Form Showing the Gauge Object Dynamically Linked to a Feature's Measured
Diameter

Graph Object

The Graph object inserts a graph into your form, custom report, or label template with
the ability to dynamically update its data. This object is not available in the Report
Template Editor.

The Graph object allows you to store and then display an array of data points. You can
use X and Y values to specify the points of data on the graph.

Default Graph object

Along with the ability to resize the object, change colors, and change other attributes,
you can cause graph objects to update their data dynamically by using these properties
in conjunction with PC-DMIS commands or Visual BASIC code:

112
About the Reporting and Form Editors

ClearAllPoint
If set to 1, all data points are cleared from the graph the next time your form
enters run mode.

If set to 0, all data points remain in the graph.

Clockwise
Setting this to NO reverses the Y axis, making the top negative and the bottom
positive.

ConnectPoints
Setting this to YES draws lines between the data points on the graph, visually
connecting them together.

DataPointColor
This changes the colors used on the X, Y data points and on any lines drawn
between points.

EnablePoint
If set to 1, your graph accepts the addition of new data points.

If set to 0, your graph rejects the addition of new data points.

LineWidth
This changes the diameter (in pixels) of the data point.

XDivisions
This divides the X axis of the graph, which essentially adds the specified number
of columns.

XMaxEq
This is the X-axis maximum equation. The value used determines the ending
value making up the X axis.

You can use a simple equation, or evaluate the data from a VBScript.

XMinEq
This is the X-axis minimum equation. The value used determines the beginning
value making up the X axis.

113
Reporting Measurement Results

You can use a simple equation, or evaluate the data from a VBScript.

XPointEq
This is the X value for your data point on the graph. You can use a simple
equation, or evaluate the data from a VBScript.

YDivisions
This divides the Y axis of the graph, which essentially adds the specified number
of rows.

YMaxEq
This is the Y-axis maximum equation. The value used determines the ending
value making up the Y axis.

You can use a simple equation, or evaluate the data from a VBScript.

YMinEq
This is the Y-axis minimum equation. The value used determines the beginning
value making up the Y axis.

You can use a simple equation, or evaluate the data from a VBScript.

YPointEq
This is the Y value for your data point on the graph. You can use a simple
equation, or evaluate the data from a VBScript.

114
About the Reporting and Form Editors

You can re-scale the Y axis by clicking on the up and down arrows near the
graph's origin. These scaling arrows are only visible in the legacy Hyper View report
editor and in the Forms editor.

Example of using PARAM to Display Data on the Graph

You can also use the REPORT/CUSTOM command with PARAM statements to specify
the graph's data points.

1. Add the Graph object into one of the editors, and size it as needed.
2. Right-click on it, choose Properties, and make a note of the Object Name
property value.
3. Set XDivisions to 5.
4. Set YDivisions to 5.
5. Set DataPointColor property to red (255.0.0).
6. Set LineWidth to 8.
7. Inside PC-DMIS, add code similar to the following:

CS1=REPORT/CUSTOM, FILENAME=MyCustomReport, Section=-1


PARAM/GRAPH1.SETVALUES=0
PARAM/GRAPH1.XVALUE=0.25
PARAM/GRAPH1.YVALUE=-0.4
PARAM/GRAPH1.SETVALUES=1
PARAM/GRAPH1.XVALUE=0.65
PARAM/GRAPH1.YVALUE=0.-0.3
PARAM/GRAPH1.SETVALUES=1
PARAM/GRAPH1.XVALUE=0.75
PARAM/GRAPH1.YVALUE=0.45
PARAM/GRAPH1.SETVALUES=1
PARAM/=

With the above code, PC-DMIS looks for a custom report named "MyCustomReport".
Notice the PARAM statements in the REPORT command. They each modify an object
named Graph1, and they use these properties to modify the graph:

XVALUE - This defines the X axis location of the data point on the graph.

YVALUE - This defines the Y axis location of the data point on the graph.

115
Reporting Measurement Results

SETVALUES - This can be either 0 or 1. A value of 0 resets the list of data points.
A value of 1 adds the data point to the list.

The resulting graph looks like this:

Example of Using BASIC Scripting to Dynamically Display Data on the Graph

You can also use BASIC code in the VBS Mini-Editor to dynamically display data
points on the graph. Suppose you want to have a script that creates the data points
automatically when a form is launched. You can do this by following this procedure:

Step 1 - Create the Form

1. Create a new form and make sure it's in edit mode. First, you will need to create
some variables that will take the X and Y values for each data point.
2. Create a Graph object, add it to the canvas, and size it as needed. name it
Graph1.
3. Right-click on it and choose Properties.
4. Set XDivisions to 5.
5. Set YDivisions to 5.
6. Set DataPointColor property to red (255.0.0).
7. Set LineWidth to 8.
8. Set YMaxEq to CONST and 1.0.
9. Set YMinEQ to CONST and -1.0.

Step 2 - Create the Variables

1. Right-click on the grid and make sure The Frame / The View is selected from the
object list on the Properties dialog box.

116
About the Reporting and Form Editors

2. In LocalVariables click the value to display the Local Variables dialog box.
3. Click Add to add a new local variable. Select Double from the Type list. In the
Name box, type GRAPH_X. Leave the Value as 0.
4. Add another local variable in the same manner and give it a name of GRAPH_Y.

Local Variables dialog box showing the two variables

5. Click OK to return to the Properties dialog box. The two variables are now
added to the form.
6. From the Properties dialog box, choose Graph1.
7. In XPointEq click the value. In the VBS-Mini Editor on the left list choose + EQ
($) and on the right list, choose <GRAPH_X>. Click OK.
8. Do the same for YPointEq and set it to <GRAPH_Y>.

Step 3 - Add the Script

1. In the EventInitialize property, click the value to display the VBS Mini-Editor.
2. Type this code in the editor:

GRAPH_X = 0.1
GRAPH_Y = -0.4
This.Refresh
GRAPH_X = 0.25
GRAPH_Y = 0.5
This.Refresh
GRAPH_X = 0.75
GRAPH_Y = -0.5

117
Reporting Measurement Results

This.Refresh
GRAPH_X = 0.85
GRAPH_Y = 0.45
This.Refresh

3. Click OK.
4. Save the form. This example gives the form the name of graphtest.form.

Step 4 - Insert a FORM/FILENAME Command and Execute

In the Edit window's command mode, type FORM and press Tab to insert a
FORM/FILENAME command block into the Edit window. Have it reference the
graphtest.form file saved in the above step.

Ensure the commands are all marked and execute the measurement routine.

When the form command is executed, and the form appears, the graph is initialized,
and the script runs and creates the data points on the graph like this:

Without Using Local Variables

If you like, you can also do the above example without defining local variables at all. In
this case, in step 3 above, your code in the VBA Mini-Editor would say this instead:

118
About the Reporting and Form Editors

this.SetValues = 0
this.XValue = 0.1
this.YValue = -0.4
this.SetValues = 1
this.XValue = 0.25
this.YValue = 0.5
this.SetValues = 1
this.XValue = 0.75
this.YValue = -0.5
this.SetValues = 1
this.XValue = 0.85
this.YValue = 0.45
this.SetValues = 1

This code is similar to the code used in the PC-DMIS commands in the "Example of
Using PARAM to Display Data on the Graph" topic.

DimensionHistogram Object

The DimensionHistogram object displays, in a histogram bar-graph format, the


number of deviations within each of the different tolerance zones.

A Sample Histogram

When a dimension only has a single tolerance value, such as a form dimension, PC-
DMIS displays the tolerance band as a range and not in a fixed location. PC-DMIS will
not display -TOL or +TOL in the resulting histogram but will instead show the heading
"TOLERANCE ZONE" at the top and include a location for the mean value like this:

119
Reporting Measurement Results

A Sample Histogram with a Single Tolerance

Inserting the DimensionHistogram Object

Use the Label Template Editor for a new or existing label template and then add and
size the DimensionHistogram object so that it appears vertically or horizontally as
desired in your label template editor's display area. Next, use the Rule Tree Editor
dialog box for a new or existing report template to specify under what conditions (for
what dimensions) PC-DMIS will call and display that label template. See the "About the
Rule Tree Editor" topic in this chapter for information on how to do this.

DimensionHistogram objects are available only for dimensions that are directly
calculated using the individual hits of their features, such as Location, Position, and
Keyin dimensions.

Changing Histogram Colors

To see how these tolerance zones are defined, or to change the colors that represent
each tolerance zone, see "Editing Dimension Colors" in the "Editing the CAD Display"
chapter.

Properties

Properties specific to this object are listed below.

HatchStyle
Same as described in the "Ellipse Object" topic.

GridControlObject

120
About the Reporting and Form Editors

The GridControlObject icon inserts a customizable grid of columns and rows into your
report or label template.

A Newly Inserted Grid Control Object

This unique object is more than just a standard table, though. In fact, you can program
the individual cells, rows, or columns using the reporting expression language to cause
PC-DMIS to pull and display specific reporting information from your measurement
routine.

As with the other objects, you can easily resize and move this object to a new location.
When you resize this object, be aware that PC-DMIS dynamically sizes the columns
and rows to fit the new object's size.

Accessing the GridControlObject Editor

Once you insert a GridControlObject, select it, double-click inside any cell, and then
right-click to display a tabbed dialog box. This dialog box gives you powerful formatting
and editing abilities that let you program each grid cell to your individual specifications.

121
Reporting Measurement Results

Cell tab of the GridControlObject's Editor

See these topics for information on using this editor:

• GridControlObject Editor - The Cell Tab


• GridControlObject Editor - The Row Tab
• GridControlObject Editor - The Column Tab

Properties

NumColumns
Determines the number of columns in the grid.

NumRows
Determines the number of rows in the grid.

TableFormat
Specifies a grid layout name to use. If this property matches the grid layout name
in the Rules Tree Editor, then you can use the TABLE/FORMAT Edit window
command to directly control row and column order and visibility for your label
template.

Transparent
Determines whether or not the grid's background is transparent. If set to Yes, the

122
About the Reporting and Form Editors

usual white background color becomes transparent; other objects behind this
object are then visible through the grid.

Increasing the NumRows property adds new rows to the bottom of the
available rows. Decreasing them will delete the bottom-most row and work up. Similarly,
increasing the NumColumns property adds new columns to the right of the available
rows. Decreasing the number of columns will delete the right-most column and work left.

GridControlObject Editor - The Cell Tab

Cell tab of the GridControlObject's Editor

Cell Type - Lets you configure what you will insert into the specific cell. Options are:

• Text - This lets you type straight text or an expression command into the Cell
Expression box. The evaluated expression or the straight text appears in the
cell.
• Image - This inserts an image into the cell. You can select it using the Select
button.
• ActiveX - This inserts an ActiveX object into the cell. Generally PC-DMIS
templates use these to display graphical analysis information. You can select
what ActiveX control to add by using the Select button. For more in depth

123
Reporting Measurement Results

information on ActiveX objects, see the "ActiveX Object" topic and the "Using
PC-DMIS ActiveX Controls" topic.

Cell Expression - This box lets you type a reporting expression into the cell. PC-DMIS
evaluates the expression when it uses the template to display the actual report data. For
example, to display a feature's ID, type =ID into this box. See "About Report
Expressions" for a robust listing of expressions you can include.

Cell Height and Width - These boxes let you define the cell's height and width in
pixels. Note that if you modify a height, all cells in that row are modified. If you change
the width, all cells in that column are modified. If you have varying heights and widths
among multiple cells, the Even Width and Even Height buttons even out the height
and width among the selected cells

Cell Justification - These buttons let you set the alignment of the text within the cell,
either vertically or horizontally. If horizontal, you can align the text to the left, the center,
or the right of the cell. If vertical, you can align the text to the top, the middle, or the
bottom.

Horizontal Alignment Buttons

- Left alignment

- Center alignment

- Right alignment

Vertical Alignment Buttons

- Top alignment

- Middle alignment

- Bottom alignment

124
About the Reporting and Form Editors

Note that when aligning text within the grid's cell, PC-DMIS uses a default
internal value for cell padding. You can use the PC-DMIS Settings Editor to override this
default value by modifying the GridCellTopMargin, GridCellBottomMargin,
GridCellLeftMargin, and GridCellRightMargin registry entries in the
Reporting section as needed. See the PC-DMIS Settings Editor documentation for
more information.

Lines area - This area contains a list for each side of the cell. You can set each side of
the cell (plus the outside or inside lines of multiple cells) to a particular line type. Options
include: None, Thin, Thick, Double, or Dashed.

Font - This button displays a standard Font dialog box allowing you to set a the font,
size, style, effects, and color for the selected cell(s).

Colors - This area lets you set the colors for the background, text, or line of the
selected cell(s). Clicking one of the buttons displays a standard Color dialog box from
which you can select a specific standard color or create a custom color.

Merge Cells - This button merges multiple cells together into one cell.

Unmerge Cells - This button unmerges previously merged cells into their original and
previous unmerged state.

125
Reporting Measurement Results

GridControlObject Editor - The Row Tab

Row tab of the GridControlObject's Editor

Repeating Group - This check box enables the Repeat Expression box and tells PC-
DMIS that the selected row will continue repeating itself with data from the report until
the expression in the Repeat Expression box is satisfied. When you select a cell in the
GridControlObject, PC-DMIS indicates any repeating rows in the object by drawing
small vertical orange bars on their left and right sides.

Notice the orange bars on the left and right sides of the row.

Repeat Expression - This box determines how many times PC-DMIS will repeat the
row. You will usually put an expression in this box that will evaluate to a counted
number of items. For example, to get the number of axes in a dimension, you would use
this expression:

=COUNT(AXIS)

Then in each cell of the row, you would need to append this to existing expressions:

:N

126
About the Reporting and Form Editors

This essentially tells PC-DMIS to repeat the row the counted number of times. So, if the
Cell Expression box in the Cell tab used =AXIS to list a dimension's axis, and you
changed it to read =AXIS:N, PC-DMIS would continue to repeat the row with unique
dimension axis data until all axes were reported.

Row Label - The Row Label list lets you define a label for your row to use with the
Table Format command. When you access the Table Format command's properties,
you will see the row labels you've defined here. Using the Table Format command, you
can re-define the order of the rows in the grid, among other things.

Locked Row - This check box locks the row so that you cannot modify it using the
Table Format command.

GridControlObject Editor - The Column Tab

Column tab of the GridControlObject's Editor

Column Label - The Column Label list lets you define a label for your column to use
with the Table Format command. When you access the Table Format command's
properties, you will see the column labels you've defined here. Using the Table Format
command, you can re-define the order of the columns in the grid, among other things.

Label Object

127
Reporting Measurement Results

The Label object icon inserts a Label object into your report template or custom report.
Label objects are used to display report data in your report. The Label object behaves
differently depending on the context in which it is used. If you use the Label object in
the Report Template Editor, it functions differently than using it in the Custom Report
Editor.

Using the Label Object within the Report Template Editor

Click and drag on the Report Template Editor to add this object. When you release the
mouse button, the inserted Label object looks something like this:

A Sample Label Object

A Label object acts just like a TextReportObject or CadReportObject; it doesn't


contain any real data and merely acts as a placeholder for a label template. The label
template actually controls what data gets pulled from a measurement routine execution.
If you don't define what the label object will display, then it doesn't appear in the report.

Assign a Label Template

To give a Label object something to display, you need to assign a label template for it to
use. Follow this procedure:

1. Right-click on the label object. The Properties dialog box appears.


2. Click Rules from the Rules Tree property. The Rules Tree dialog box appears.
3. Using the Rules Tree dialog box, select an item from one of the expandable lists.
4. Click Add to add a rule that uses that item. The Edit Rule dialog box appears.
5. Select Use Label Template for Report option.
6. Click the browse button , and select a label template file (.lbl filename
extension).
7. Click OK to close the Edit Rule dialog box.
8. Click OK to close the Rules Tree dialog box. The label object you inserted will
now display a picture of the label template defined in the first rule in the Rule
Tree dialog box.
9. Save and test your report template. PC-DMIS will display the selected label when
the condition you specified is met.

128
About the Reporting and Form Editors

See "About the Rule Tree Editor" for information about creating rules.

Using the Label Object within the Custom Report Editor

One crucial difference between the Report Template Editor and the Custom Report
Editor is that in the Custom Report Editor, Label objects do not use their own Rule Tree
Editor. Instead, the Page object contains a Rule Tree Editor that defines what label
template is used when the different commands and data are inserted into the Custom
Report Editor.

Most of the time you will likely simply create your custom report by dragging items from
the Edit window's Summary mode into the Custom Report Editor. In this case, PC-DMIS
uses the label templates defined in the Page object's Rule Tree Editor for the command
you are inserting.

If you do insert a Label object into your custom report, PC-DMIS inserts a blank Label
object, similar to how it would appear in the Report Template Editor:

A Sample Label Object

In this state, the object is merely an empty placeholder, and it won't display any data
until you drag and drop a command from the Edit window onto the object. PC-DMIS will
then display the label template defined in the Page object's Rule Tree Editor.

See "Creating Custom Reports" for more information.

Leader Line Object

The LeaderLine object lets you draw leader line (a connecting line) between a Label
object and a CadReportObject. To do this, simply select the object, then click and drag
it from one object to the other.

129
Reporting Measurement Results

If done properly, the leader line automatically snaps between the two objects so that if
you later change their locations, the leader line changes size and moves accordingly.
For example, this figure shows a CadReportObject object with three Label objects
around it all with connecting LeaderLine objects.

Three Label objects with LeaderLine objects drawn to a CadReportObject

If the leader line can't detect the two objects, a Leader Line Construction dialog box
appears, allowing you to select the two objects for the leader line.

Leader Line Construction dialog box

If you delete the Label or a CadReportObject object, PC-DMIS also deletes the leader
line object automatically.

In the actual Report window, depending on the location of the label to the feature, the
leader line attaches to either one of the edges or corners of the label. Consider this
graphical example. It illustrates that where you position the labels (rectangles) in

130
About the Reporting and Form Editors

relationship to the feature (red circle) changes where the leader line connects (green
dot) on the label.

Graphical Example of Labels and Leader Line Connection Positions

The following properties are available:

LeaderLineVisibility
This sets the visibility state of the selected leader line. TRUE shows the leader
line. FALSE hides it.

Object1
Defines the first of the two objects between which the leader line will be drawn.

Object2
Defines the second of the two objects between which the leader line will be drawn.

Line Object

The Line object allows you to insert a standard line into your form or template. You can
then right-click on the inserted line and modify its properties.

Common properties used on a line object are:

PenWidth
This sets the width of the line in pixels.
131
Reporting Measurement Results

PenStyle
This changes the line style to Solid, Dash, Dot, Dash-dot, and Dash-dot-
dot.

Arrowhead
This determines if the line should contain an arrowhead and the direction the
arrowhead points. You can choose one of these formats:

----(none)
<---
--->
<--->(both)

ArrowheadHeight
This determines the height of the arrowhead in pixels.

ListBox Object

The ListBox object inserts an open list inside the form.

Along with the ability to resize the object, change colors, and change other attributes,
you can further customize this object by using these properties:

BorderDrawn
Setting this to YES draws a border around the control.

HorizontalScroll
Selecting Always places a horizontal scroll bar on the list box even if the text for a
list item isn't long enough to cause it to scroll.

Selecting None removes the scroll bar.

ListID
This is the ID of the list. You can set or get this by using the control. It should be in
this format:

item 1\r\nitem 2\r\nitem 3 and so on.

RemoveSelection
Selecting YES removes the selection from the list box (ListID) when recorded.

132
About the Reporting and Form Editors

Sort
Selecting YES sorts the list items alphabetically.

UseColors
This determines whether or not the control should use the colors specified in the
BackColor and TextColor properties.

UseTabstops
This determines whether or not the list box should use tab stops. If set to YES,
pressing Tab in run mode will eventually make this list box the active control.

VerticalScroll
Selecting Always places a vertical scroll bar on the list box even if there aren't
enough list items to cause it to scroll.

Selecting None removes the scroll bar.

WantKeyInput
This determines whether or not the list box should accept keyboard input.

MultiEditBox Object

The MultiEditBox object inserts an edit box that supports more than one line of text.
This has all the properties of the EditBox object (see "EditBox Object"), plus the
following:

HorizontalScroll
Selecting Always places a horizontal scroll bar on the control even if the text isn't
long enough to cause it to scroll.

Selecting None removes the scroll bar.

VerticalScroll
Selecting Always places a vertical scroll bar on the control even if the text isn't
long enough to cause it to scroll.

Selecting Automatic places a vertical scroll bar only when the amount of text
exceeds the vertical height of the box.

133
Reporting Measurement Results

Selecting None removes the scroll bar.

OLE Object

The OLE object embeds or links an object from another application into your template
or form. For example, using this object you can insert an editable Microsoft Word file
into your template or form to provide special instructions to the operator.

Once you insert an OLE object, a dialog box titled Insert Object appears.

Insert Object dialog box

This dialog box allows you to select the type of OLE object from a list of objects that are
currently available on your computer. The OLE objects in the list are unique to your
individual computer, depending on what is installed, etc.

If you select Cancel, nothing is added to the form or template, and the dialog closes.

DoVerbs
Setting this to Yes allows the object to be edited in run mode as well as in edit mode. If
set to No, the object is read-only in run mode.

OLEProperties
This displays a properties dialog box that lets you choose general properties available
to all OLE objects, such as how the object is displayed (icon or not), its size, and so
forth.

134
About the Reporting and Form Editors

Accessing an OLE Object’s Automation Methods and Properties from Basic

You can access an OLE (Object Linking and Embedding) object's methods and
properties from Basic to automate tasks related to the object. For example, you could
change a bitmap image, populate an embedded Microsoft Excel spreadsheet object
with data, or set the text in an embedded Microsoft Word document.

Suppose you add an Bitmap OLE control, and you name it "BITMAP" by setting its
(Object Name) property to BITMAP, you can add program code to change the bitmap
being displayed. To do this, you can access the OLE automation methods and
properties for the object named BITMAP, with the following code:

AttachOLE("BITMAP_X")

You can then use the object variable BITMAP_X to set a new property value or perform
an automation method call:

BITMAP_X.{property} = {value}

or

BITMAP_X.{automation method call}.

Consult your OLE's documentation for the particular OLE object you are using
to know what methods and properties are available.

Providing Operator Instructions Using OLE Objects with Forms

Using existing tools in conjunction with PC-DMIS can provide you with much desired
functionality. For example, suppose you want to provide an operator with detailed
instructions regarding part setup or measurement. One way to do this is to embed into a
custom form, using the OLE object, an external file containing these instructions. Below
are some examples of how to embed instructional files into forms using some common
Microsoft Office tools.

These examples demonstrate how to use a Microsoft Word file and Microsoft
PowerPoint file as OLE objects inside of a form to provide instructions to an operator
during measurement routine execution. They will give you a taste of things you could do
with OLE objects inside of your report or form. How you put this knowledge to use for
your own situation is up to you.

• Providing Instructions Using a Microsoft Word OLE Object

135
Reporting Measurement Results

Perhaps one of the simplest ways to provide instructions to those running your
measurement routines is to simply use something like Microsoft Word.

This topic and the steps below assume you have Microsoft Word
installed on your computer.

Step 1 - Create and Save the Instructions as a Word Document

1. Create your part setup instructions inside of a Word document.


2. Save the .doc file to a directory on your disk. Feel free to include pictures,
tables, and other advanced formatting inside your .doc file. The sample
doc file used for this topic looks like this:

Step 2 - Create the Form

1. Select File | Reporting | New | Form Report to open the Form Editor.
2. If the Edit window is open, select View | Edit Window to close it giving
you more screen space.
3. Maximize the Form Editor.
4. Size the form so that it will properly house the contents of your file.
5. Add any other objects as desired. In the example form used for this topic,
a Close Form button was added with the following properties:

136
About the Reporting and Form Editors

• Text = "Close Form"


• ButtonType = OK

When clicked, the form automatically closes.

Step 3 - Insert the OLE Object

1. From the Object Bar, click the OLE Object icon. Drag the object so that it
fits the entire form except for a half inch margin on all sides. When you
release the mouse button, the Insert Object dialog box appears.
2. Select the Create from File option.
3. In the File box, either type the complete pathway to the .doc file, or use
the Browse button to locate it.
4. Select the Link check box. This maintains a link between the OLE object
on your form and your .doc file, so that if you later update your instructions
PC-DMIS will always use the latest information.
5. Click OK. The document is embedded into your form like this:

6. Save the form and give it a name of your choice.

137
Reporting Measurement Results

The Insert Object dialog box is the same dialog box that appears if you
choose to insert an external object into the Edit window by using Insert | Report
Command | External Object. Consult the "Inserting External Objects" topic from
the "Inserting Report Commands" section if you need more information on this
dialog box.

Step 4 - Insert and Test the Form

1. Select View | Edit Window to make the Edit window visible.


2. Select Insert | Report Command | Form. Use the dialog box to select
your saved form.
3. PC-DMIS inserts a FORM/FILENAME command block into your
measurement routine with a pathway to the form file.

CS1=FORM/FILENAME = <Pathway to Form File>


PARAM/=
ENDFORM/

4. Mark the command block for execution.


5. Execute the measurement routine. When PC-DMIS reaches the
FORM/FILENAME command block, it displays the form:

138
About the Reporting and Form Editors

6. Click Continue from the Execute Mode Options dialog box to close the
form and resume execution.

• Providing Instructions Using a Microsoft PowerPoint OLE Object

This topic demonstrates how to use a Microsoft PowerPoint file (.ppt) as an OLE
object inside of a form to provide detailed slide-show type instructions to an
operator.

This topic and the steps below assume you have Microsoft PowerPoint
installed on your computer.

Step 1 - Create and Save the Instructions as a PowerPoint

1. Create your part setup instructions inside of a PowerPoint file (.ppt).

2. Save the .ppt file to a directory on your disk.

Step 2 - Create the Form

1. Select File | Reporting | New | Form Report to open the Form Editor.
2. If the Edit window is open, select View | Edit Window to close it giving
you more screen space.

139
Reporting Measurement Results

3. Maximize the Form Editor.


4. Size the form so that it will properly house the contents of your file.
5. Add any other objects as desired. In the example form used for this topic,
a Close the Form button was added with the following properties:
• Text = "Close the Form"
• ButtonType = OK

When clicked, the form automatically closes.

Step 3 - Insert the OLE Object

1. From the Object Bar, click the OLE Object icon. Drag the object so that it
fits the entire form, except for a half inch margin on all sides. When you
release the mouse button, the Insert Object dialog box appears.
2. Select the Create from File option.
3. In the File box, either type the complete pathway to the .ppt file, or use the
Browse button to locate it.
4. Select the Link check box. This maintains a link between the OLE object
on your form and your .ppt file, so that if you later update your instructions
PC-DMIS will always use the latest information.
5. Click OK. The PowerPoint file is embedded into your form.

6. Save the form and give it a name of your choice.

140
About the Reporting and Form Editors

The Insert Object dialog box is the same dialog box that appears if you
choose to insert an external object into the Edit window by using Insert | Report
Command | External Object. Consult the "Inserting External Objects" topic from
the "Inserting Report Commands" section if you need more information on this
dialog box.

Step 4 - Insert and Test the Form

1. Select View | Edit Window to make the Edit window visible.


2. Select Insert | Report Command | Form. Use the dialog box to select
your saved form.
3. PC-DMIS inserts a FORM/FILENAME command block into your
measurement routine with a pathway to the form file.

CS1=FORM/FILENAME= <Pathway to Form File>


PARAM/=
ENDFORM/

4. Mark the command block for execution.


5. Execute the measurement routine. When PC-DMIS reaches the
FORM/FILENAME command block, it displays the form and the
embedded PowerPoint presentation.

141
Reporting Measurement Results

6. Double-click on the embedded presentation. The Microsoft PowerPoint


software will launch and display the presentation. When it finishes,
PowerPoint will close.
7. Click Continue from the Execute Mode Options dialog box to close the
form and resume execution.

Pointer Object

The Pointer object inserts a dynamic, movable, colored pointer into the form or
template. The color defaults to yellow.

Along with the ability to resize the object, change colors, and change other attributes,
you can cause this object to move by using these properties in conjunction with Visual
BASIC code:

MaximumEq
Maximum equation (This value can be a set constant number, a value evaluated
from a simple equation, or a returned value from a VBScript).

-$, $, CONST

MinimumEq
Minimum equation (This value can be a set constant number, a value evaluated
from a simple equation, or a returned value from a VBScript).

-$, $, CONST

ValueEq
Value equation (This value can be a set constant number, a value evaluated from
a simple equation, or a returned value from a VBScript).

-$, $, CONST

142
About the Reporting and Form Editors

If you change the direction of the pointer, the movement of the arrow will also
change to the direction specified.

PointInfo Object

The PointInfo object acts as a container to hold individual point information in your
report.

Using the PointInfo Object in a Label Template

Using the Object Bar for the Label Template editor, add and size the PointInfo object
so that it appears as desired in your Label Template editor's display area. Save the
label template. Next, use the Rule Tree Editor dialog box for a new or existing report
template to specify under what conditions (for what dimensions) PC-DMIS will call and
display that label template. See "About the Rule Tree Editor" in this chapter for
information on how to do this.

Using the PointInfo Object in a Custom Report

Using the Object Bar for the Custom Report editor, drag or drop the PointInfo object
into the Custom Report. PC-DMIS displays the Point Info dialog box allowing you to
select the point to be associated with the object.

143
Reporting Measurement Results

Select the feature or dimension and then a point from the dialog box, set whatever
options you want, and click OK. PC-DMIS creates point info commands for the selected
features or dimensions and closes the dialog box. PC-DMIS displays a table on your
report that contains feature or dimension point information.

See "Inserting Point Info Boxes" in the "Inserting Report Commands" chapter for
complete information on how to use this dialog box to display dimension information.

In a custom report, the Analysis object can display its own Point Info boxes
as well. See "Analysis Object" for more information.

Properties specific to this object are listed below. Many of these you can set by clicking
on the (Settings Dialog) property:

DimFeatID
Defines the feature or dimension ID containing the hits you want to display.

HitNumber
Defines what hit number for the information you want displayed in the point info
box.

OrderDeviation
Defines the order of the deviation row with a value between 1-4. A value of 1 puts
the info on the top row. A value of 4 puts the info on the bottom row.

OrderHitNum
Same as above, except it defines the order of the hit number.

OrderPoint
Same as above, except it defines the order of the point row.

OrderVector
Same as above, except it defines the order of the vector row.

ShowGraph
A value of 1 displays the dimension percentage graph. A value of 0 hides the
graph.

ShowHeadings
A value of 1 displays the heading row. A value of 0 hides the heading row.

144
About the Reporting and Form Editors

ShowID
A value of 1 displays the ID of a particular feature or dimension row. A value of 0
hides the ID.

ShowPointInfo
A value of 1 displays the point info row. A value of 0 hides the ID. Disabled at this
moment.

ShowType
A value of 1 displays the type of feature or dimension displayed. A value of 0
hides the type.

Polyline Object

The Polyline object allows you to link lines together. When you click and create the first
line, a second line is automatically started at the end point of the first line. Polyline
objects contain the same properties as a standard line object.

Radiobutton Object

The Radiobutton object inserts option buttons into the form. Option buttons are
mutually exclusive. You can only have one option button selected inside your report at a
time. The ListItems property allows you to define a set of option buttons.

Along with the ability to resize the object, change colors, and change other attributes,
you can further customize this object by using these properties:

AlignTextLeft
If set to YES, this moves the text to the left of the option button like this:

Text Here ( )

If set to NO, this moves the text to the right of the option button like this:

( ) Text Here
145
Reporting Measurement Results

Bitmap
This allows you to specify a bitmap to use for a selected option button.

The specified bitmap must be the same shape as a standard check box.

BitmapOffState
This allows you to specify a bitmap to use for a deselected option

The specified bitmap must be the same shape as a standard option button.

ListItems
This defines a list of option buttons and its associated values (see the description
on the List Choices dialog box below).

The ListItems property displays the List Choices dialog box.

List Choices dialog box

This dialog box allows you to add, rename, and delete option buttons and assign
numerical values. Generally, when adding a new option, the value for that option
increments automatically, so only one button is selected at a time. However, you can
change the numerical values to allow the selection of groups of options with one mouse
click when in run mode.

For example, suppose you have five option buttons that you've named Options A
through E, and you change their assigned values to the following:

Option buttons Value


Option A 0
Option B 0
Option C 1

146
About the Reporting and Form Editors

Option D 2
Option E 2

When you enter run mode and select Option A, both Option A and Option B will be
selected. This is because they're assigned the same value. Similarly, if you select
Option E, both Option D and Option E will be selected. Only Option C has a unique
value, so when you select it, only it is selected.

Select Object

The Select object isn't a traditional object that you insert into the template or form
editor. Rather, it allows you to select an object already inserted into your editor. To
select an object, click on the object in the report. To let you know when you select an
object, PC-DMIS surrounds it with a border and small green squares. Once you select
an object, you can move, resize, or edit the object.

SectionCutObject

The SectionCutObject lets you define a section cut (cutaway view) of the CAD model.
You can insert a SectionCutObject into the Report Template Editor as with other
objects, or you can insert it into a final report page on the Report window directly. To
insert this object, position the mouse pointer, and click and drag a box. When you
release the button, the object appears, and—at least in the Report Template Editor—it
displays "No Image!" until you move the clipping plane so that it intersects with the CAD
model. You can move the clipping plane through the object's properties.

Changing the Object's Properties

If you insert the SectionCutObject into the Report Template Editor, right-click on it to
access the object's Properties dialog box. You can modify the properties directly in the
Properties dialog box or select the (Settings Dialog) property, and click the ... button
to use the Section Cut Settings dialog box to more easily modify its properties.

If you insert this object on-the-fly into a report page of the Report window, the same
Section Cut Settings dialog box appears.

147
Reporting Measurement Results

Section Cut Settings dialog box

You can use this dialog box to define a cutaway image of your part model that you want
to show in your report.

Defining a Cutaway Image Using the Section Cut Settings Dialog Box

1. Fill out the X, Y, and Z boxes to define a point on the CAD model where the
clipping plane intersects with the model.
2. Fill out the I, J, and K boxes to define the direction the plane faces.
3. Modify the Tolerance value as needed.
4. Click the Load button to see a live preview of the cutaway image in the Section
Cut Settings dialog box.
5. Use the large left and right arrow icons to fine-tune the placement of
the plane and get the exact cutaway view that you need. The preview in the
dialog box updates to match the placement of the plane.
6. Reposition the image as desired. Pan the image by right-click dragging. Zoom in
or out on the cutaway image by right-clicking above or below the imaginary
horizontal line that splits the image view. 2D rotate the part image by holding the
Ctrl key and right-click dragging.
7. Finally, place callouts onto the dialog box image by using the Add Tag button.
148
About the Reporting and Form Editors

8. Click OK to accept your changes.

Section Cut Settings Dialog Box Items

X Y Z boxes
These boxes define a point on the CAD model where the clipping plane cuts the model.

I J K boxes
These boxes define the IJK direction vector of the clipping plane.

Tolerance box
The tolerance parameter is used to:

• Check if the polyline is closed. The start and end point distance is less than the
tolerance value.
• Reduce the polyline.
• Merge polylines.

Load button
This button previews the section cut line on the CAD image as well as the section cut
profile.

Hide Image check box


This check box hides the section cut profile image in the Preview window. If you click
the OK button, PC-DMIS also hides the section cut profile image in the Report Template
Editor or on the Report window's page.

Move clipping plane along above IJK area


This area contains an edit box and arrow buttons.

The edit box defines the distance that the clipping plane moves when you click the left
arrow or right arrow button.

The arrow buttons move the clipping plane along the IJK vector by the specified
distance with each click.

• If you have 1,0,0 then the plane moves along the X axis.
• If you have 0,1,0 then the plane moves along the Y axis.
• If you have 0,0,1 then the plane moves along the Z axis.

Add Tag button


This button allows you to place callouts on the cutaway image of the part model.

149
Reporting Measurement Results

Clicking this button changes your cursor to a cross-hair icon. You can click and drag a
leader line on the cutaway image in the dialog box. When you release the mouse
button, a small text box appears, which allows you to type the callout text. The number
of characters this text box can display is only limited by the size of the text box.
Increasing the size of the box allows it to hold and display more characters.

You should place tags on the image only when the cutaway image has been completely
finalized. If not, the tag is deleted with future modifications to the image.

OK and Cancel buttons


Clicking OK applies your changes to the section cut profile image and displays the
image in the Report Template Editor or Report window. If your report contains a
CadReportObject, the section cut line appears on the CAD image.

Clicking Cancel closes the dialog box without applying your changes. However, if
you've added the object on-the-fly into your Report window, the SectionCutObject still
exists. If desired, you can remove it by right-clicking on the object and selecting
Remove Object.

Object Properties

Bottom
Common Properties

Enable
Common Properties

EventReportData
About Events and Visual Basic Code

Font
Common Properties

Hide Image
See description in table describing dialog box items above.

Left
Common Properties

Plane Anchor X
See description in table describing dialog box items above.

150
About the Reporting and Form Editors

Plane Anchor Y
See description in table describing dialog box items above.

Plane Anchor Z
See description in table describing dialog box items above.

Plane Vector I
See description in table describing dialog box items above.

Plane Vector J
See description in table describing dialog box items above.

Plane Vector K
See description in table describing dialog box items above.

Right
Common Properties

(Settings Dialog)
This property displays the Section Cut Settings dialog box.

Tolerance
See description in table describing dialog box items above.

Top
Common Properties

Visible
Common Properties

Defining On-The-Fly Section Cut Profiles

Perhaps the easiest way to use section cut profiles is to define them using an on-the-fly
creation method within the final report in the Report window itself. To do this:

1. Right-click on the Report window. A shortcut menu appears.


2. Select the Add Object on Page | Section Cut Profile menu item.
3. Click and drag a box directly on the Report window with the size of the cutaway
image you want. When you release the mouse button, the Section Cut Settings
dialog box appears.
4. Use the dialog box to define the cut profile as described above. PC-DMIS inserts
the section cut profile into the Report window.

151
Reporting Measurement Results

Sample Section Cut Profile

Modifying Section Cut Profiles in the Report Window

Right-click on the object and select Edit Object from the resulting shortcut menu.

Slider Object

The Slider object inserts a slider into your template. With a slider in your report, you can
allow users to set a value from a range of continuous possible values.

Along with the ability to resize the object, and change other attributes, you can further
customize this object by using these properties:

152
About the Reporting and Form Editors

AutoTicks
Setting this to YES displays ticks on the slider. A tick is a short vertical/horizontal
line that is placed at intervals (set by the TickFrequency property) along the
range of the slider.

DisplayID
This determines whether or not the DisplayID gets updated when the slider gets
adjusted.

HelpHotButton
Selecting YES shows a question mark help button next to the slider.

Clicking this help button in run mode launches the PC-DMIS Online Help.

MaximumEq
Maximum equation (This value can be a set constant number, a value evaluated
from a simple equation, or a returned value from a VBScript).

-$, $, CONST

MinimumEq
Minimum equation (This value can be a set constant number, a value evaluated
from a simple equation, or a returned value from a VBScript).

-$, $, CONST

Orientation
This sets the orientation of the slider.

Selecting Horizontal sets the slider to move horizontally, side to side.

Selecting Vertical sets the slider to move vertically, up and down.

TickFrequency
This value determines the frequency that ticks are displayed. You can set a value
between 2 and 200 ticks equally spaced along the range of the slider.

TickStyle
This allows you to set how ticks are displayed on a slider.

153
Reporting Measurement Results

0 – Both: sets the ticks to above and below the slider (if a horizontal
slider) or to the right and left sides (if a vertical slider).

1 - Top/Left: sets the ticks above the slider (if a horizontal slider) or to
the left (if a vertical slider).

2 - Bottom/Right: sets the ticks below the slider (if a horizontal slider)
or to the right (if a vertical slider).

ValueID
This is the ID of the value. You can set or get this by using the control.

Snipping Object

The Snipping object on the Object Bar puts PC-DMIS in a snipping mode. This object
works with only the Custom Report Editor. In snipping mode, you can capture a section
of your screen and insert it as an image into the Custom Report Editor.

To use the Snipping object and insert an image:

1. Click the Snipping object to enter snipping mode. The arrow of your pointer
changes to a cross hair, and a semi-transparent white overlay covers the entire
screen.
2. With your pointer, click and drag a box around the part of the screen you want in
your report.
3. Release the mouse button to capture that part of the screen as an image. PC-
DMIS inserts the image as an object with the name of Snipping1 into the Custom
Report Editor. Additional captures are named Snipping2, Snipping 3, and so on.

The properties for the this object are described in the "Common Properties" topic.

154
About the Reporting and Form Editors

Spinner Object

The Spinner object inserts a spinner control into your template. You can set this control
to work with an edit box, allowing you to select a numerical value by cycling through a
range of numbers. The range of numbers is set using the MinimumEQ and MaximumEQ
properties.

Along with the ability to resize the object vertically, and change other attributes, you can
further customize this object by using these properties:

DecimalBase
This sets the base of the spinner to either decimal based (select YES) or
hexadecimal based (select NO).

EditBuddy
Selecting YES associates the spinner to the edit control immediately preceding the
spinner in the tab order. You can view the tab order by selecting an object in edit
mode and pressing Shift + Enter.

IncrAccelerator
This value determines the amount to increment or decrement the spinner each
time you click an arrow. The default is 1.

MaximumEq
Maximum equation (This value can be a set constant number, a value evaluated
from a simple equation, or a returned value from a VBScript).

-$, $, CONST

MinimumEq
Minimum equation (This value can be a set constant number, a value evaluated
from a simple equation, or a returned value from a VBScript).

-$, $, CONST

Orientation
This sets the orientation of the spinner control.

Selecting Horizontal rotates the orientation of the spinner arrows to point


horizontally.

Selecting Vertical rotates the orientation of the spinner arrows to point


vertically.
155
Reporting Measurement Results

WrapAround
If incrementing or decrementing the list of values and you come to the minimum or
maximum value, you can set this property to YES, and your report will wrap to the
beginning or end of the list.

TextReportObject

The TextReportObject object allows you to insert a container for your textual report
data into your report template. When you insert this object, PC-DMIS initially displays a
box filled with some sample report data, which is useful for design purposes. Once your
template gets applied to a report, your actual report data is used.

A TextReportObject with Sample Report Data

156
About the Reporting and Form Editors

A sample Report window showing actual report data

You can change an inserted TextReportObject's display by selecting the object, right-
clicking on it, and editing its properties.

Properties specific to this object include:

Colors
Lets you change the colors of the text displayed. By default, PC-DMIS causes this
object to use the same color scheme you used in the Edit window's Command
mode. When you click this property, PC-DMIS displays a message box asking if
you want to create an independent color set. Click Yes to access the Color Editor
dialog box. You can then use this editor to define a new color scheme for the
selected TextReportObject.

See "Defining Edit Window Colors" in "Setting Your Preferences" for


information on how to use the Color Editor.

157
Reporting Measurement Results

Report Header After PRINT


This property determines how PC-DMIS handles a report header after a
PRINT/REPORT command. For information, see the "Header after Print
Command" area in the "Edit Text Reporting" topic.

RuleTree
Accesses the Rules Tree Editor for this object. This property allows you to create
rules to determine when and how expressions or label templates are used in the
object.

Label templates and expressions let you control the report data that appears in
this object. See "About the Rule Tree Editor"

ShowAlignments
Shows or hides alignments in your report.

ShowComments
Shows or hides comments in your report.

ShowDimensions
Determines which dimensions get displayed in your report.

All - Shows all dimensions.


None - None of the dimensions are shown.
Out of Tolerance - Shows only out of tolerance dimensions.
Within Limits - Shows only dimensions within tolerance limits.

ShowFeatures
Shows or hides features in your report.

ShowHeaderFooter
Shows or hides the report's header and footer information.

ShowMoves
Shows or hides move commands in your report.

ShowScreenCaptures
Shows or hides screen captures in your report.

158
About the Reporting and Form Editors

Text Object

The Text object allows you to insert textual labels, descriptions, and markings into your
template. This is helpful in making your report more meaningful. You can change an
inserted text object's display by selecting the text object, right-clicking on it, and editing
its properties.

The properties for the this object are described in the "Common Properties" topic.

TextVar Object

The TextVar object allows you to insert dynamic, numerical text into your template. This
object differs from the Text object by deleting the TEXT property and adding these 2
properties:

ValueEq
Value equation (This value can be a set constant number, a value evaluated from
a simple equation, or a returned value from a VBScript). The value is formatted
and displayed at run time.

-$, $, CONST

Format
This formats the numerical value using 'C' language standards. However, you
should use only the numeric portion. For example, the format %5.2lf becomes
5.2, %5d becomes 5. One exception to this is when using BOOLEAN variables,
the $ string gets converted into NO or YES.

To use this object edit the ValueEq property so that it's set to display a variable number
value.

159
Reporting Measurement Results

The Layout Bar

The Layout Bar gives you the tools you need to effectively arrange, organize, and
display your objects inside the edit mode grid. The following topics discuss the
functionality of each icon.

Edit

The Edit icon places the template into run mode. The Report Template and Label
Template editors always remain in edit mode. This icon only functions when working
with the Form Editor.

Property Sheet

The Property Sheet icon displays the properties for the selected object in the
Property Sheet dialog box. The Property Sheet dialog box enables you to change the
properties for a selected object. To change the object whose properties you're looking
at, choose a different existing object from the list at the top of the Property Sheet dialog
box.

For complete information on properties, see "About Object Properties".

Toggle Grid
Toggle Grid

The Toggle Grid icon shows or hides the available grid. In edit mode, the grid
helps you size objects precisely, because it contains a dot every tenth of an inch. For
more information, see "Working with the Grid" below.

160
About the Reporting and Form Editors

Working with the Grid


When working in a form or template editor, PC-DMIS can display or hide a grid on the
background of your form or template in these ways:

• Click the Toggle Grid icon ( ) from the Layout Bar.


• Press Ctrl + G.

You can use this grid as a tool for the accurate placing and sizing of objects. It also
helps you control a template's margin guidelines.

A - Guidelines
B - Grid markings

Example showing the default grid's markings and guidelines

Select Edit | Layout | Grid Settings to access the Grid Settings dialog box.

Grid Settings dialog box

You can then use this dialog box to customize the grid. A description of the controls in
this dialog box follows:

161
Reporting Measurement Results

Show Grid check box


The Show Grid check box toggles the display of the grid.

Snap to Grid check box


The Snap to Grid check box determines whether controls placed on the grid get
moved, or snapped, to the nearest grid location.

Spacing area
The Spacing area sets the amount of spacing between the grid markings. The
smaller you set these numbers, the closer together the grid markings are.

Guidelines area
The Guidelines area allows you to determine the location of the top, left, right,
and bottom margin guidelines for the template editor.

The value in each of these boxes sets the distance in grid markings to where the
guideline is set. Setting the value to zero removes the guideline completely.

You cannot place objects beyond these guidelines.

View Snap Points

The View Snap Points icon shows the snap points on each object. Snap points
are useful in tying objects together with lines. For example, you can create a line
between a text box description pointing to an object, such as a circle, by using a line to
connect snap points on the text box description and the circle object. Then, like a leader
line, when you move the circle to a new location, the attached line stretches and shrinks
to accommodate the new position of the circle.

To use snap points as described in the above example,

1. Create a circle object.


2. Create a line object.
3. In edit mode, select the View Snap Points icon from the Layout Bar. You will
notice that objects on the grid that have an area displays blue-colored points.
These blue points are snap points.

162
About the Reporting and Form Editors

Sample circle showing five snap points

4. Select the line and drag one end of it until the end rests directly on the desired
snap point of the circle. Try moving the circle object. The line is attached to the
circle object's snap point.
5. Create a text object for a description for the circle and edit it with a brief
description.
6. Select the other end of the line and drag it until it rests on one of the snap points
of the text object.
7. Now select and drag either the text box description or the circle object. Notice
that the line object gets longer or shorter and moves so that there's always a
straight line between the used snap points of the two objects.

To detach objects attached to a snap point, simply drag the attached end of the object
off of the snap point.

Snap Points vs. Leader Line objects

Most of the time you will probably use the Leader Line object instead of snap points. It
has nearly all the same functionality as snap points and is easier to use (see the
"Leader Line Object" topic). One advantage snap points have over the Leader Line
object, is their ability to support more than one line between objects and their ability to fit
the connecting line exactly to a snap point. For example, with snap points you can
create a more complex shape directly in the edit mode, as shown here:

Sample Cylinder created with two four lines fitted to snap points on the two filled circles.

Supported Objects

Only Line and Polyline objects can attach to objects that have snap points. Below are
the objects that have snap points:
163
Reporting Measurement Results

• Text
• TextVar
• Border
• Ellipse
• Bitmap
• Dimension Color Key
• Histogram
• Feature Text
• Dimension Info
• Point Info

Viewing Attached Objects

On complex pages with a lot of objects, you may find it useful to use the View | Route
menu option to see the chain of objects connected to the currently selected object. This
menu option selects all objects connected in some way by snap points to the currently
selected object.

Toggle Ruler

The Toggle Ruler icon allows you to turn on or off the ruler located on the top and
left sides of the grid. The ruler shows the size of the grid in inches or centimeters. It also
displays your cursor's position along the grid's horizontal axis (top ruler) and vertical
axis (side ruler). You can switch between Inches or Centimeters by right-clicking on the
ruler and selecting the desired option from the shortcut menu.

Zoom In or Out
These icons allow you to zoom in or out of your Hyper report and then restore the
original view:

Zoom In - This zooms in on your report by 100 percent per click. You can click
this icon at most five times to get a 500 percent zoom.

Zoom Out - This zooms out of your report by 100 percent per click if you're
already zoomed in. If you haven't zoomed in at all, you will only be able to zoom out by
100 percent one time.

Zoom 1:1 - This restores the size of your report to the original 1 to 1 zoom size.

164
About the Reporting and Form Editors

No matter what you zoom to, PC-DMIS restores the original zoom whenever you
activate a control that has an "activated" or "deactivated" mode (for example, double-
clicking on the CadReportObject or GridControlObject). When you leave these controls
and return to the editing environment, the zoom size goes back to what it was.

Group

The Group icon allows you to select multiple objects and group them together.
Once grouped, the editor will show the grouped objects as one object.

To group multiple objects, either hold down the SHIFT button and select all objects in
the group, or box-select all objects and then click the Group icon.

Ungroup

The Ungroup icon restores object in a group to their individual ungrouped states.
To do this, select a grouped object and click Ungroup.

Regroup

The Regroup icon regroups the last ungrouped set of objects without your having
to reselect the individual objects.

Align Edges

The Align Edges icon lets you arrange a set of selected objects along their left,
right, top, or bottom edges:

Align Left - Aligns the selected objects along their left edges.

Align Right - Aligns the selected objects along their right edges.

Align Top - Aligns the selected objects along their top edges.

Align Bottom - Aligns the selected objects along their bottom edges.

165
Reporting Measurement Results

Align Center

The Align Center icon provides you with these additional icons that allow you
to center selected objects either horizontally or vertically:

Center Vertically - Centers the selected objects vertically along the


horizontal axis.

Center Horizontally - Centers the selected objects horizontally along the


vertical axis.

Space

The Space icon provides you with these additional icons that allow you to
equally space selected objects either horizontally or vertically:

Space Across - Equally spaces selected objects along the horizontal axis

Space Down - Equally spaces selected objects along the vertical axis

Make Same Size

The Make Same Size icon provides you with these additional icons that allow
you to equalize the width, the height, or both the width and height of all selected objects:

Make Same Width - Equally sizes the widths of the selected objects

Make Same Height - Equally sizes the heights of the selected objects

Make Same Size - Equally sizes both the widths and the heights of the
selected objects

166
About the Reporting and Form Editors

To Front or Back

The To Front or Back icon provides you with additional icons that allow you to
place a selected object (or objects) in front or in back of other objects. This is helpful
when you have multiple objects on top of each other, and you want certain objects to be
visible. The available icons include the following:

Bring to Front - Moves the selected objects in front of all other objects so
that it is shown on top.

Send to Back - Moves the selected objects behind all other objects so that it
is shown beneath.

Notes on Drawing Levels

Moving objects in front of or behind other objects is subject to an internal drawing level
used by the different objects. This means you can only bring objects in front of other
objects of the same drawing level or in front of a higher drawing level. Here is the
drawing order:

CADReportObject - Drawing level 5


This object is drawn behind all objects of a lower drawing level. It can be drawn in
front of other level 5 objects.

AnalysisWindow - Drawing level 4


This object can be drawn in front of level 4 or 5 objects.

Leader Line - Drawing level 3


This object can be drawn in front of level 3, 4, or 5 objects.

All other reporting objects - Drawing level 2


These objects can be drawn in front of level 3, 4, or 5 objects.

You can move objects of the same level in front of or in back of each other, but you
cannot, for example, bring a CADReportObject in front of a Label Object. This type of
sorting is only used by PC-DMIS version 4.x and higher reporting templates or reports.
Legacy (HyperView) reports do not use a sort method.

Undo (Action)

The Undo icon undoes the last action you took in the editor.

167
Reporting Measurement Results

Redo (Action)

The Redo icon redoes the last action that was undone when you clicked the Undo
icon.

About Object Properties


Each object that you add to a template or form has a set of properties (or attributes) that
control the object’s position, size, colors, font, text, name, and so on. Each object also
has a set of event handler functions that PC-DMIS triggers when certain events occur.
For example, an event can occur when you click or double-click the mouse on that
object.

You can use the Properties dialog box to view and modify properties and event
handlers. Another name for this dialog box is "property sheet".

Viewing an Object's Properties

To view the Properties dialog box, select an object (single-click within its boundaries)
and then right-click. This is an example of a property sheet that shows the text object
Text1 and its various properties:

Sample Properties dialog box

Viewing Object Properties

A list appears at the top of the Properties dialog box. This list contains an entry for
each object in your template or form. It also contains some objects that always exist and
168
About the Reporting and Form Editors

you cannot delete, such as the main editing area. In the Report editor, the main editing
area is called the Page. In the Label Editor and the Form Editor, it is called The
Frame/The View.

To view the properties for an object in your form or template, select a different object
from this list. If you have a report template with more than one section, this list shows
only the objects in the current section.

For report templates, you can access an additional object called Report only
from this list. It has two properties in the Advanced category that you can use to specify
your own external executable (an .exe file) to collect user-assigned properties. These
properties are Template Selection Program and Measurement Routine Execution
Program. PC-DMIS runs the specified measurement routines while you select a
template and execute a measurement routine, respectively.

Property Organization

Each object's properties are in three main categories:

• Standard - These properties control color, position, and line styles.


• Advanced - These properties control whether the object is enabled or visible.
• Events - These properties enable you to use the BASIC language to code
specific instructions when events occur.

To expand a category, click the + symbol to the left of the category. To collapse a
category, click the - symbol.

ActiveX and OLE objects have an additional section. For more information,
see "ActiveX Object" and "OLE Object".

For descriptions of properties, see "Common Properties". If that topic does not contain a
description of a property, view object-specific documentation in "The Object Bar".

For more information on events, see "About Events and Visual Basic Code".

Name Identifier

When you insert an object into a template or form, PC-DMIS automatically assigns a
unique name identifier to the object's ObjectCode property. Subsequent objects of the

169
Reporting Measurement Results

same type have the same name, with an incremented numerical value behind it. For
example, the editor automatically names your first Text object "Text1". It names
subsequent Text objects "Text2", "Text3", and so on.

You can change this value to a different name. If you change it, ensure that you give it a
unique name. If you modify that object's name identifier, you must also update any
BASIC scripting that uses an object's code.

Changing Property Values

To modify a property, select it and then click its value. If a list appears, select a new
value. You can also type a new value in an editable field.

Expressions as Property Values

Some property values can hold reporting expressions instead of a constant value, just
as a cell from a GridControlObject can hold expressions. Remember to preface the
expression with an equal sign (=). For example, suppose that you have a Text object in
a label template, and you also want it to display the current feature's ID instead of other
text. In the Text property, type "=ID". When PC-DMIS executes the measurement
routine, the object pulls the feature's name from PC-DMIS and displays it in that Text
object.

Common Properties
The following are some common properties used on various objects. They make up the
core set of properties for many other objects. Properties specific to an object are
documented in that object's documentation. Events properties are detailed in the "About
Events" topic.

Common Standard and Advanced Properties

Accelerator
This allows you to define the letter to use in conjunction with the Alt key to create
an accelerator for the control. The letter or symbol defined should be unique from
those used for other accelerators (including the accelerators on the menu bar).
This is used with most form controls.

Alignment
Text alignment within the text object’s defining rectangle.

AnchorSnaps
Field that allows you to create, delete or modify snap points in the Enter Snap

170
About the Reporting and Form Editors

Points dialog box. Snap points are found on the ellipse, rectangle, text box, or
bitmap image objects.

You can connect Line or Polyline objects to an object's snap points by dragging
the tip of the line onto the displayed blue snap point.

Once connected, when you drag the object to a new location, the resulting line
remains connected to the snap point, rotating, elongating, and shrinking as
necessary. This feature is helpful when you need to create a "leader-line" that
constantly points to an object that you'll frequently be moving.

To display snap points, from the Layout toolbar click the View Snap Points icon
.

Auto Size
This determines whether or not the object sizes itself automatically based on the
length of the text it contains.

If this is set to YES and Word Break is set to NO, then the text object
automatically adjusts its width.

If this is set to YES and Word Break is set to YES, then the text object
automatically adjusts its height.

BackColor
Background color of the object. This color is used to fill the object’s defining
rectangle.

Nil - This stands for no value. It means the background will be transparent,
allowing other colors of objects behind this object to show through. By default,
anything with a BackColor property is set to Nil.

Setting the color to Nil sets the color to RGB(255,255,254) which is then made
transparent within the Report window.

If you try to specify a color of RGB(255,255,254), PC-DMIS automatically sets it


to RGB(255,255,255), a non-transparent color. This does not affect how the
object is displayed.

171
Reporting Measurement Results

Be aware that if your label has a bitmap image that uses the color
RGB(255,255,254), PC-DMIS sets that color to transparent inside the Report
window.

BorderStyle
Style of border drawn around the object.

Bottom
Distance, in pixels, of the bottom of the object’s rectangle from the top of the
template or form.

CursorPointer
Cursor displayed when the user drags the mouse over the object.

Enable
Enable or disable the object. A disabled object may still be visible, but does not
respond to user input.

Font
Font used for text rendered in the object.

ForeColor
Foreground color of the object. In the case of the text object, specifies the text
color.

Group
This is used with form objects, such as buttons, check boxes, radio buttons and so
on.

HatchStyle
This sets the type of pattern (or hash) to use to with the object. Available patterns
are:

Horizontal

Vertical

Diagonal

172
About the Reporting and Form Editors

Reverse Diagonal

Cross

Diagonal Cross

Objects that use this include: Border, Ellipse, Histogram, TextVar

HelpContextID
This is the context ID of a specific help topic to call. This is often used in
conjunction with the Help button type which invokes WinHelp( ).

Layer
This assigns the current object to the selected layer.

Left
Distance, in pixels, of the left side of the object’s rectangle from the left side of the
template or form.

LineStyle
This changes the objects line style (or border style) to Solid, Dash, Dot, Dash-
dot, and Dash-dot-dot.

LineWidth
This sets the line's (or border's) width in pixels.

(Object Code)
Unique name that identifies an object in a template or form. Whenever you need
to access a property or method of an object using the BASIC language, use the
following syntax:

{Object Code}.{property or method name}

Orientation
Orientation of the text inside the object. Horizontal text flows from left to right.
Vertical Up flows from bottom to top. Vertical Down flows from top to bottom.

173
Reporting Measurement Results

Padding
This property adds pixels of white space around the text by the given amount.

PC-DMIS Commands
(Appears only for objects added to the Custom Report Editor)

Adds or Removes command references to existing objects in your report. Select


an object in your report, and select this property. The PC-DMIS Commands
dialog box appears.

PC-DMIS Commands dialog box

By default, all the commands in your measurement routine appear in the


expandable and collapsible list on the left. However, for some objects, namely
the Label object, GridControlObject, Analysis object, and DimensionHistogram
object, some commands may not be valid. In those cases they are disabled in
the list. You can choose to hide any disabled commands in the left-hand list by
selecting the Show only valid commands check box.

The right-hand list displays all the commands referenced by the object.

1. Select the commands from the left-hand list that you want the selected
object to reference. PC-DMIS displays them in the right-hand list if the
object supports taking multiple commands. However, in most cases, you
can only select one command.
2. Click OK. The dialog box closes and PC-DMIS now references the new
command in the selected object.

174
About the Reporting and Form Editors

This essentially provides an alternate approach to updating an object to use


different data from the measurement routine. See "Dragging and Dropping
Information into a Custom Report" for the usual way of updating objects.

For the CADReportObject or the AnalysisObject, features whose check boxes


are marked are added to the object. Features whose check boxes are cleared
are removed from the object. If nothing is marked, PC-DMIS displays items
according to the HideAllPointsonReport and
HideAllMeasuredFeaturesOnReport registry entries in the Reporting
section of the PC-DMIS Settings Editor.

For objects that support multiple commands (such as the GridControlObject),


this dialog box lets you change the order of referenced commands.

PC-DMIS References
(Appears only for objects added to the Custom Report Editor)

Tracks the commands referenced by the selected reporting object. During report
generation, for each command, PC-DMIS checks the command references of
each object. If that object indicates that it has a reference to the command being
processed, PC-DMIS sends the command data to that object.

Most objects only support one command at a time, but some objects can support
data from multiple commands (such as the GridControlObject). If you drag and
drop commands into the Custom Report Editor, PC-DMIS takes care of
managing the references for you internally. You should only need to use this
property if you decide to have manual control over which commands are
referenced for some reason.

PenWidth
Width of the pen used to draw the object. In the case of the text object, the pen
width only affects the border drawn around the text.

Right
Distance, in pixels, of the right side of the object’s rectangle from the left side of
the template or form.

175
Reporting Measurement Results

ShadowStyle
This sets the location of the 3D shadow on the resulting object. Available locations
are:

Top/Left, Bottom/Right, or None

Tag
Place holder that stores user-defined data.

Text
Text appearing in the text object. You can also type an ampersand symbol (&) in
front of any alphanumeric character in this field to create a shortcut key (shown as
an underlined character). Once defined, you can press the key along with the Alt
key in run mode to cause that control to immediately have the focus. If you plan on
using a lot of shortcut keys, you can ensure they are unique by using the Edit |
Layout | Check Mnemonics menu item in edit mode.

Tabstop
This determines if pressing the Tab key cycles to the object. This is used with form
objects, such as buttons, check boxes, radio buttons and so on.

ToolTipText
Text displayed when you move the mouse over the object inside run mode.

Top
Distance, in pixels, of the top of the object’s rectangle from the top of the template
or form.

ValueID
This contains the value of the ID, or on supported objects it contains the CurPage
and NumPages variables. You get and set this property using the control. This is
used with most of the form objects.

Visible
Visibility state of the object. A value of 1 corresponds to visible, 0 to hidden.

Word Break
Determines whether or not the text object can hold more than one line of text. If
set to YES, then PC-DMIS wraps text strings that exceed the width of the object
container within the object container. If set to NO, then text strings remain on a
single line.

176
About the Reporting and Form Editors

TheFrame/TheView Properties
The main editing areas in the Label Template Editor and Form Editor contain a special
object called TheFrame/TheView. This object also contains properties that you can
access and set just as with any other object.

• Properties that are followed by a single asterisk (*) are used in the
Label Template Editor only.
• Properties that are followed by two asterisks (**) are used in the Form Editor
only.
• All other properties are used in both the Label Template Editor and the Form
Editor.

Height
Defines the height, in pixels, of the main editing area.

Horizontal Positioning **
Sets the horizontal position of the form within the window when executed.

LocalDecls
Declares variables with a scope that is available to your entire form or label.

LocalVariables **
See the "Declare Global Variables Using the LocalVariables Property" topic.

MaximizeBox **
If set to Yes, this property displays a Maximize icon in the upper-right corner of the
form. You can click this icon in Run mode or during execution to maximize your form
window to fill the available space.

If MaximizeBox is set to Yes but MinimizeBox is set to No, then the Minimize icon still
appears but is unavailable for selection.

MinimizeBox **
If set to Yes, this property displays a Minimize icon in the upper-right corner of the
form. You can click this icon during run mode or during execution to minimize your form
window to the taskbar.

If MinimizeBox is set to Yes but MaximizeBox is set to No, then the Maximize icon still
appears but is unavailable for selection.

177
Reporting Measurement Results

Page Orientation *
Sets the label to one of the predefined standard orientations, either Portrait or
Landscape.

Page Size *
Sets the label to one of the page sizes available on your default printer. You may see
items such as Letter, A4, or one of several other sizes depending on your type of
printer.

ReportLock **
Determines whether PC-DMIS can clear data from a form. If this is set to Yes, PC-DMIS
does not clear data from the form. If it's set to No, PC-DMIS clears data from the form
that is collected over time.

Supported Command Types *


Displays the Supported Command Types dialog box. With this dialog box, you can
define the commands that should use this label template. Then in the Report window,
when you right-click on a label and select the Change Report menu item, PC-DMIS
only displays those labels that support the selected command type.

ToolTipText
See the "Common Properties" topic.

Vertical Positioning **
Sets the vertical position of the form within the window when executed.

Width
Defines the width, in pixels, of the main editing area.

Section and Page Properties


The main editing areas in the Report Template Editor and the Custom Report Editor are
special objects called the Section and the Page, respectively. These objects contain
properties that you can access and set just as with any other object.

Command Set
Defines how commands get processed within the current section (Page tab).

All Commands - The setting processes the entire command set in the
current section (Page tab). This is the default value.

Continue from Previous Section - This setting continues to process the


command set from the previous section, continuing where the last section
stopped processing.

178
About the Reporting and Form Editors

Same as Previous Section - This setting causes the section (Page tab) to
take exactly the same command set as the previous section. The head
section and all subsequent sections with this setting form a mini-group. All
subsequent sections in the mini group create one page with the head page.

(Form Name)
Defines the name of the page.

Height
Defines the height, in pixels, of the main editing area.

LocalDecls
Provides a window for you to declare variables local to this object. Once declared,
you can use these variables in events that affect the object. This type of
declaration lets you give the variable a value in one event and then check that
value in a different event. The variable is safe from accidental modification since it
is invisible to other objects in the report or form.

LocalVariables
See the "Declare Global Variables Using the LocalVariables Property" topic.

Maximum Number Of Pages


Defines the maximum number of report pages that use the design of the current
Page tab.

For example, if you set this value to 2, but you have easily enough dimensions in
your measurement routine to fill five pages, the section does not process
commands once the number of pages for that section reaches the specified
maximum of two pages. The current process command needs a newly-created
section (Page tab) to display additional information.

The default value of 0 means there is no maximum and so all pages are
displayed.

ToolTipText
Common Properties

Width
Defines the width, in pixels, of the main editing area.

179
Reporting Measurement Results

Examples of "Command Set" and "Maximum Number of Pages" Properties

In the following examples, suppose that your report template has four sections named
A, B, C, and D, and that each one contains a TextReportObject. Additionally, suppose
that your measurement routine has enough dimensions to display three pages of
dimensions per section. For each example, a table details the property settings.

Example
Sections Maximum Number of Pages Command Set
A 0 All Commands
B 0 All Commands
C 0 All Commands
D 0 All Commands

In this example, PC-DMIS displays the pages in the final report like this:

A1,A2,A3,B1,B2,B3,C1,C2,C3,D1,D2,D3

Example
Sections Maximum Number of Pages Command Set
A 1 All Commands
B 0 All Commands
C 0 All Commands
D 1 All Commands

In this example, PC-DMIS displays the pages in the final report like this:

A1,B1,B2,B3,C1,C2,C3,D1

Example
Sections Maximum Number of Pages Command Set
A 1 All Commands
B 0 All Commands
C 0 Same As Previous Section
D 1 All Commands

In this example, PC-DMIS displays the pages in the final report like this:

180
About the Reporting and Form Editors

A1,B1,C1,B2,C2,B3,C3,D1

Example
Sections Maximum Number of Pages Command Set
A 1 All Commands
B 0 Continue From Previous Section
C 0 Same As Previous Section
D 1 All Commands

In this example, PC-DMIS displays the pages in the final report like this:

A1,B2,C2,B3,C3,D1

Working with User Assigned Properties


In the Report Template Editor, the Properties dialog box contains the ability to make a
property user definable. This allows you to let measurement routine operators change
object properties at runtime.

For example, suppose you want your report title to change dynamically according to
whatever the current measurement routine operator wants. You can add an interactive
approach such as this to your reports by using this functionality.

To Make a Property User Assigned

1. Select an object in one of the editors. For the example above, you would select a
Text object.
2. Right-click on the object. This causes the property sheet for that object to appear
on the right side of the editor. On the left side of the property sheet, you will see
check boxes next to most properties. These check boxes determine what
properties you can make user definable.

181
Reporting Measurement Results

Sample Property Sheet for a Text object. Notice the user definable check boxes
on the left.

3. Select the check box next to the property that you want to make definable. For
the example above, you would select the Text property for a Text object. A User
Assigned Property dialog box appears, asking you to determine the message
that will prompt the user for the property value and when the user should be
prompted.

User Assigned Property dialog box

4. In the Prompt box, type the prompt the user will receive, and then select from
one of the two option buttons when the user will receive the prompt. You can

182
About the Reporting and Form Editors

choose to prompt the user either during template selection or measurement


routine execution.
5. Click OK. The User Assigned Property dialog box closes.
6. Save the report template and return to your measurement routine.
7. To test this, use the Report window and click the Template Selection icon.
Select the report template from the dialog box and then execute your
measurement routine.
8. At some time during the previous step, PC-DMIS will display the Define User
Assigned Properties dialog box to prompt you for the properties' values
according to the option button you selected in the User Assigned Property
dialog box.

Define User Assigned Properties dialog box

To View and Manipulate all Your User Assigned Properties

1. Access a report or label template that has user definable properties.


2. Select Edit | User Assignable Properties. The User Assigned Properties
dialog box appears. This dialog box shows those properties that will be
presented during template selection or measurement routine execution.

183
Reporting Measurement Results

User Assigned Properties dialog box

3. Select an item from the Prompt Style drop-down list to filter what gets displayed
in this dialog. The user assigned properties appear in the list box below. The list
box tracks all the properties, what objects they belong to, and their prompts.

• To remove a property, select the property and click the red X. That
object's property will no longer be user definable and will use the default
value already defined in the template.

Delete Property icon

• To reorder a property, select the property that you want to move and then
click the red up or down arrows. This will move the selected property up or
down in the list.

184
About the Reporting and Form Editors

Red Up and Down Arrows

• To change a property's prompt or when the prompt should appear, double-


click on the property in the Feature column. PC-DMIS displays the User
Assigned Property dialog box, allowing you to make the change.

User Assigned Property dialog box

If you selected Prompt when user selects template from the User Assigned
Property dialog box, PC-DMIS will only prompt you once for any user assigned values.
Thereafter, for that measurement routine, PC-DMIS will automatically use the initial
property value until you clear out all template associated data. See the "Clearing
Template Associated Data" topic in this chapter.

If you selected Prompt when report is executed then PC-DMIS automatically displays
the Define User Assigned Properties dialog box each time the measurement routine
executes.

Clearing Template Associated Data


The File | Reporting | Clear Template Associated Data menu item removes the
following items used in the current measurement routine with the current selected report
template:

• Any user-assigned property values. By clearing these, PC-DMIS will again


prompt you for values to any user assigned properties in the current template.
• Table customizations on labels.
• Label placement customizations around CADReportObject objects.
• Changes to the rotation or zoom factor of any CADReportObject objects.
• Any other object modifications, additions, or page duplications.

185
Reporting Measurement Results

About Events and Visual Basic Code

This section assumes that you have at least some background with the Visual
Basic programming language. If you need to learn Visual Basic, please consult a book
or other external resource on the subject.

The Events section on the Properties dialog box contains a list of event handler
functions that your template or form object supports. An event handler function will be
called whenever the event implied by the name of the function occurs for the given
object. When that function gets called, any Visual Basic code inside that function gets
executed.

Available Event Handler Functions

EventClick
Called when the mouse is clicked on the object.

EventDblClick
Called when the mouse is double-clicked on the object.

EventDragDrop
Called when another "draggable" item is dropped onto the object.

EventDragEnter
Called when a draggable item is initially dragged onto the object.

EventDragOver
Called when a draggable item is dragged over the object.

EventInitialize
Called when the form first enters into run mode before any other handlers are
called on the object.

EventMouseDown
Called when a mouse button is depressed while over the object. Parameters
passed to the function indicate which button was pressed, if the SHIFT key was
pressed, and the coordinates of the mouse at the moment the mouse button was
depressed.

EventMouseMove
Called when the mouse is passed over the object. Parameters passed to the
function indicate which button was pressed, if the SHIFT key was pressed, and
the coordinates of the mouse when the move event was sent.
186
About the Reporting and Form Editors

EventMouseUp
Called when the mouse button is released over the object. Parameters passed to
the function indicate which button was pressed, if the SHIFT key was pressed,
and the coordinates of the mouse at the moment the mouse button was released.

EventPumpData
This is perhaps the most widely used handler function in the Form Editor.
EventPumpData is called whenever BASIC variables that may affect the object
change value. Your code can also force EventPumpData to be called on
individual objects (or on all objects in a report) when you wish an object to update
itself. Basically, any code that an object needs to reinitialize itself based on
variable values or the state of other objects should occur in EventPumpData.

EventTerminate
Called when the report is being closed or when toggling from run mode to edit
mode in the Form Editor.

This handler function is only available for the Section editing environments.

EventReportData
This is perhaps the most widely used handler function in the Report and Label
Template editors. It gets called whenever report data gets plugged into the current
template.

Its primary function is to let you create your own ActiveX controls that get placed
into a label. For example, PC-DMIS's best fit and feature analysis controls use this
event to send data to the ActiveX control from the command. To see this, open the
label named best_fit_analysis.lbl, click on the ActiveX control inside the label, and
then look at the BASIC code inside its event handler. A single line passes data
from the command into the control.

With data passed to your own ActiveX control, you can then use automation
commands to extract and manipulate the data. See the Pcdbasic help file for
information on PC-DMIS automation.

187
Reporting Measurement Results

This event gets called once for each command when applying the report
template or during measurement routine execution.

Adding Code to Event Handlers

In order to add BASIC language code to any of the event handlers:

1. Click on the function’s entry from the list of event handlers. A Mini Visual BASIC
language editor will appear, with the opening and closing statements of the
subroutine already filled in.
2. Type additional BASIC language statements code into the editor.
3. Click OK.
4. Test your code.

• If you are using the Form Editor, test your form by pressing Ctrl + E to
enter run mode.
• If you are using one of the template editors, test your code by applying the
template to a report and redrawing the report using the Redraw Report
icon from the Reporting toolbar.

Since you don't interact with clickable buttons, lists, fields, or other interactive
elements when using a report, the only event handler function available is the
EventReportData function.

Event Example 1: Calling Code on an EventClick Event

This event example uses a Button object in the Form Editor.

1. Select File | Reporting | New | Form Report to open the Form Editor.

2. First, insert a button into your form by clicking on the Button icon ( ) on the
Object toolbar and then dragging out a rectangle for the button onto the form.
3. Make sure that the button is selected (highlighted).

188
About the Reporting and Form Editors

4. Right-click on the button to bring up the dialog box that shows the button’s
properties.
5. If the list is not expanded, click on the + sign next to the Events section to
expand the list. You should see a list of all of the available event handler
functions for the button object.

Example of a Button Object's Events

6. Double-click the EventClick function in the list. A Visual BASIC Editor entitled
VBS Mini-Editor opens.
7. Add the following code to the EventClick function inside the VBS Mini Editor:
MsgBox "I've been clicked."

8. Click the OK button in the upper right-hand corner of the VBS Mini-Editor. Close
the Property Sheet.
9. Save the report by selecting File | Save. You are now ready to test the report in
run mode.
10. Switch to run mode (press CTRL + E).
11. Click on the button you created. A message box with the text I’ve been clicked!
should appear.

189
Reporting Measurement Results

This simple example illustrates the basics of scriptable forms and event handlers.

Event Example 2: Modify Object Properties on Triggered Event

This exercise follows the above exercise, you should have completed it first.
This example also uses the Form Editor.

Suppose you want to modify the properties of another object (say the text in a text
object) when the button has been clicked.

1. In the Form Editor, switch back to edit mode (press Ctrl + E).
2. Create a new text object.
3. Open the text object’s properties (select and then right mouse click).
4. Make sure that the text item’s Object Code property reads "Text1". The Object
Code property is the name that is used to refer to that object from BASIC code.
5. If not expanded, click on the + sign next to the Events section to expand the list.
6. Double-click on the EventInitialize handler function. The VBS Mini-Editor
opens.
7. Add the following code to the EventInitialize function:
Set This = Text1
8. Press the ENTER key to get to a new line. On the next line type this code:
This.Text = "The button has not yet been clicked"
9. Click the Ok button to close the editor.
10. Once the object Text1 has been set up as described, open the property sheet for
the button object added in the prior exercise.
11. Click the Events tab.
12. Double-click on the EventClick function.
13. Replace the basic code you added in the previous example with the following two
lines:
Line 1: MsgBox "I’ve been clicked, and am about to modify
Text1’s text"

Line 2: Text1.Text = "The button was clicked!!!"

190
About the Reporting and Form Editors

14. Click the OK button to close the VBS Mini-Editor.


15. Close the Property Sheet.
16. Switch to run mode (press Ctrl + E). The code you added to Text1’s
EventInitialize function will set Text1 to initially read "The button has not yet
been clicked".
17. Now try clicking on the button. The "I’ve been clicked, and am about to modify
Text1’s text" message should appear. As soon as you close the message box,
Text1’s text should be modified to read "The button was clicked!!!".

This example illustrates how the properties of any object in a form may be accessed
from Basic code via the ObjectCode.property_name syntax.

Access Object Methods

Many of the objects support various methods in addition to their properties. These
methods may be accessed from BASIC code via the ObjectCode.method_name
syntax. This means you can see what properties and methods are available for any
given object by typing the object’s Object Code in the VBS Mini-Editor followed by a
period. As soon as the period is typed, a mini wizard will pop up showing the available
methods and properties for that object.

So if you had a text object named "Text1" you could type "Text1" followed by a period
and a list of available methods or properties for a text object would appear.

Variables declared within an event handler function (via the BASIC Dim var_name as
var_type syntax) are in scope only during that event handler function. There will
undoubtedly arise situations when you would like to declare variables, functions, or
subroutines that are accessible from all BASIC code in a template or form—variables
with global scope for a particular report. The template and form editors provide a place
to make these declarations.

Declare Global Variables Using the LocalVariables Property

If you wish to declare global variables of any of the standard data types (String, Integer,
Double, etc.) and have them show up in the Basic Wizard, you can use the
LocalVariables property of TheFrame/TheView or Section.

To use the LocalVariables property:

1. Select then right-click an object to display the Property Sheet for The
Frame/The View.
2. Select the Settings tab.
3. Scroll down to the LocalVariables property.

191
Reporting Measurement Results

4. Double-click the LocalVariables property to display the Local Variables dialog


box.

Local Variables dialog box

The Local Variables dialog box allows local variables of any of the basic types to be
added, removed, named, and initial values to be set. Again, these variables are global
to this template or form and will be accessible from any of the BASIC code written for
this template or form. They will also appear in the Local Variables area of the Script
Wizard.

The name "LocalVariables" is something of a misnomer, since variables


declared in the Local Variables dialog box actually have a global scope to that
particular template or form. It indicates that the variables declared here are "local" to
this particular template or form and cannot be accessed on other forms. Nevertheless,
they are set as global variables, available to other routines elsewhere in the template or
form they are defined from.

Declare/Define Variables, Functions, or Subroutines

To declare and/or define variables, functions, or subroutines that are to be accessible


from all BASIC code in a report, use the LocalDecls property of TheFrame/TheView
found on the PC-DMIS tab of the Property Sheet.

To do this:

1. Open the Property Sheet for an object.


2. Select TheFrame/TheView from the list.
3. Click the PC-DMIS tab.

192
About the Reporting and Form Editors

4. Double-click the LocalDecls item on the property sheet to display the


VBS Mini-Editor.

You may add any BASIC code you wish to this window, including variable declarations
and functions, or subroutine definitions. Any variables, functions, or subroutines
declared here will be global, but will not appear in the Script Wizard.

Understanding the Report Template Editor


To access the Report Template Editor, select File | Reporting | New | Report
Template. To open an existing report template, select File | Reporting | Edit | Report
Template.

PC-DMIS displays the Report Template Editor in a new window.

Report Template Editor

The Report Template Editor acts as a work area. It enables you to drag, size, and place
various objects, and set their properties. You place your objects on top of the white
area, called the template or section. If you have worked with legacy (HyperView)
reporting in previous versions of PC-DMIS, you will feel at home with this editor since it
essentially functions much the same way and contains many of the same user interface
elements.

193
Reporting Measurement Results

With the template approach to reporting, you cannot place the Report or Label template
editors into run mode. They only open in edit mode and cannot be switched. Run mode
still functions with the Form Editor.

Run Mode - This mode only works with the Form Editor. In Run Mode you can run (or
execute) your form, testing it for how it would look or behave in an actual measurement
routine execution environment.

Edit Mode - This is the default mode for all the reporting editors and is the only mode
for the Report and Label template editors.

You can switch between run and edit modes by pressing CTRL + E.

The editor contains the following elements:

• The Menu bar


• The Font Bar (toolbar)
• The Object Bar (toolbar)
• The Layout Bar (toolbar)
• Object Property Sheets
• Sections
• Working with the Grid

About Sections

Sample Sections

Sections make up the main editing area in a report template. These tabbed, scrollable
areas in the Report Template Editor are where you can insert objects into your current
report template. Sections give you greater control over when objects appear in your
report.

With the Report Template Editor, you can add additional sections to your template and
create powerful multi-section reports. Sections, however, are not the same as pages.
Objects inserted into one section will not appear in other sections, but will appear in

194
About the Reporting and Form Editors

multiple pages of the same section. This approach lessens the complexity of creating
report items like headers and titles that you want to remain static.

For example, you can choose to place a description of the report and author data on the
first section of your template, a TextReportObject onto the second section, and a
CadReportObject onto the third section. Then, depending on the length of your report
data, each section in your report may spawn up to several pages.

Sections are only used in the Report Template Editor. Before version 4.0, the
main editing area for HyperView reports was called "TheFrame/TheView". This name is
still used in the Form Editor and the Label Template Editor where sections are not used.
For the Report Template Editor, the editor's "Section" is where you place your reporting
objects.

To Add a New Section

1. Make sure your Report Template Editor window is maximized.


2. Scroll to the very bottom of your template.
3. Right-click on the Section1 tab.
4. Select Add Tab from the shortcut menu. PC-DMIS inserts a new section,
Section2, into your template. Your template should now have two sections, like
this.

To Delete a Section

1. Make sure your Report Template Editor window is maximized.


2. Scroll to the very bottom of your template.
3. Right-click on the section tab you want to delete.
4. Select Delete from the shortcut menu. PC-DMIS deletes the section.

To Modify a Section's Properties

1. Make sure your Report Template Editor window is maximized.

195
Reporting Measurement Results

2. Scroll to the very bottom of your template.


3. Right-click on the section itself. The Properties dialog box appears.
4. Modify the properties as desired. To rename a section, rename the section's
FormCode property.

Spanning Command Sets Across Sections to Control Page Layout and


Output Collated Pages

Two section (Page) object properties provide a way to span a command set from one
report template section to another. This enables you to create different pages with
different layouts while using the same command set. You can also use these properties
to output the report as collated pages. See the "Section and Page Properties" topic for
information and examples on the Command Set and Maximum Number of Pages
properties.

Properties Specific to Sections

See "Section and Page Properties".

About the Label Template Editor


To access the Label Template Editor, select File | Reporting | New | Label Template.
To open an existing label template, select File | Reporting | Edit | Label Template.

PC-DMIS displays the Label Template Editor in a new window.

196
About the Reporting and Form Editors

Label Template Editor

This editor is similar to the Report Template Editor and the Form Editor. With the
exception of some differences in its Object Bar, the user interface is essentially the
same. While you can technically put any object from the Label Template Editor's Object
Bar into a label template, you will generally work with the GridControlObject. The label
template is the white and sizable box on top of the "LABEL" background.

With the new template approach to reporting, you cannot place the Report or Label
template editors into run mode. They only open in edit mode and cannot be switched.
Run mode still functions with the Form Editor.

Run Mode - This mode only works with the Form Editor. In run mode, you can run
(or execute) your form. This enables you to test how it would look or behave in an
actual measurement routine execution environment.

Edit Mode - This is the default mode for all the reporting editors and is the only
mode for the Report and Label template editors.

To switch between run and edit modes, press CTRL+E.

The editor contains the following elements:

• The Menu bar


• The Font Bar (toolbar)
• The Object Bar (toolbar)
197
Reporting Measurement Results

• The Layout Bar (toolbar)


• Object Property Sheets

About the Custom Report Editor


To access the Custom Report Editor, select File | Reporting | New | Custom Report.
To open an existing custom report for your current measurement routine, select File |
Reporting | Edit | Custom Report.

You can access a slimmed down version of this editor from the Report window's
Reporting toolbar. This lets you edit a report without leaving the usual PC-DMIS menu
structure. You can do this through either of these options:

Click Custom Report selection dialog ( ) and then click Blank Report and then
Open.

Click Edit report ( ).

PC-DMIS displays the Custom Report Editor with the Edit window placed into Summary
mode next to it.

Custom Report Editor with the Summary mode to its left


198
About the Reporting and Form Editors

This editor is similar to the Report Template Editor, Label Template Editor, and Form
Editor. With the exception of some differences in its Object Bar, the user interface is
essentially the same.

The custom report is the white and sizable area on top of the "CUSTOM" background.
Note that when you use this editor, you do not create a template, but create the actual
report that appears in the Report window. When you create a new custom report, this
editor opens side by side with the Edit window set in Summary mode. This allows you to
drag the desired objects from Summary mode onto your Custom Report. See "Creating
Custom Reports".

With the Custom Report Editor, you cannot place the Report or Label template editors
into run mode as you did with the HyperView editor. The Custom Report Editor only
opens in edit mode and cannot be switched to run mode. Run mode functions only with
the HyperView editor or the Form Editor.

The editor contains the following elements:

• The Menu bar


• The Font Bar (toolbar)
• The Object Bar (toolbar)
• The Layout Bar (toolbar)
• Object Property Sheets

Understanding the Form Editor


To create a new form in the Form Editor, select File | Reporting | New | Form Report.

To open an existing form in the Form Editor, select File | Reporting | Edit | Form
Report.

PC-DMIS displays the Form Editor in a new window.

199
Reporting Measurement Results

Form Editor

The Form Editor acts as a work area. It enables you to drag, size, and place various
interactive form objects, such as buttons, list boxes, edit boxes, and so forth, and set
their properties.

Objects are placed on the gray and sizable area, called a form. If you have worked with
HyperView reporting in previous versions of PC-DMIS, you will feel at home with this
editor since it essentially functions much the same way and contains many of the same
user interface elements.

With the new template approach to reporting, only the Form Editor can use the run-
mode capability. The Report and Label template editors do not use it.

Run Mode - This mode only works with the Form Editor. In run mode, you can run
(or execute) your form. This enables you to test how it would look or behave in an
actual measurement routine execution environment.

Edit Mode - This is the default mode for all the reporting editors. It is the only
mode for the Report and Label template editors.

To switch between run and edit modes, press CTRL+E.

The editor contains the following elements:

• The Menu bar

200
Creating Templates

• The Font Bar (toolbar)


• The Object Bar (toolbar)
• The Layout Bar (toolbar)
• Object Property Sheets
• Object Sheet

Creating Templates
While PC-DMIS comes with some pre-designed templates that fit most users' needs,
you can delve into the powerful template editors to create your own report and label
templates. You can also use the Form Editor to create a more interactive approach to
execution and reporting.

There are several report templates (.rtp) and label templates (.lbl) that ship with
PC-DMIS.

File location: C:\Users\Public\Public Documents\Hexagon\PC-


DMIS\<version>\Reporting

For more information, see "Using Standard Reports".

The following topics discuss how to use the report template and label template editors
to create your own templates.

Are you new to template reporting? Follow the "Creating a Report Template" and
"Creating Label Templates" tutorials.

In addition to creating your own templates, you can download custom templates from:
Hexagon Support. If you need further support for custom templates, contact your
regional office or headquarters.

About Reports and Report Templates


In older versions of PC-DMIS you would have had to create a different report for each
measurement routine, but no longer. Now, PC-DMIS uses report templates.

A report template is not a report, but a description for a report. The template describes
what data PC-DMIS should use to create a report, where it will go, and what it will look
like. You can use report templates for more than one measurement routine to
standardize the look and feel of several reports.

201
Reporting Measurement Results

You create templates inside of the Report Template Editor. Report template files have a
.rtp filename extension and are created inside the PC-DMIS report template editor.

You can make report template files as simple or as complex as you like. A simple report
template might contain a single TextReportObject, while a complex report template
might contain several different objects, bitmap images, shapes, or even items that use
the reporting expression language and scripting to detail exactly what appears from the
report data.

Do not confuse the report template's filename extension, .rtp with the older
HyperView report filename extension, .rpt. These are completely different file formats.

Report Template Selection Precedence


PC-DMIS selects the report template based on this order of precedence:

1. The default report template assigned to the current measurement routine. You
can define a default report template for each measurement routine by clicking the

Set this report as default template button in the Reporting toolbar.


For details on this button or the Reporting toolbar, see the "Reporting Toolbar"
topic.
2. The report template specified as the default report template in the Settings
Editor, if one exists. For details, see the "DefaultReportTemplate" topic in the
Settings Editor documentation.
3. The TEXTONLY.RTP file.
4. The default.rtp file.

For information on the TEXTONLY.rtp and default.rtp template files, see the "Using
Standard Reports" and "Viewing a Legacy Text Report" topics.

Tutorial - Creating a Report Template


This topic walks you through a very basic tutorial that will create a simple report
template with a few objects and some labels. This should give you a basic overview of
how things work together so that you can create and use your own report templates.

202
Creating Templates

In order to give you a good foundation on how to use the template editors, this
tutorial shows how to create a report template from scratch. However, in practical use,
you will most likely find it much easier to customize one of the standard templates to suit
your needs.

Before you begin this tutorial, create a simple measurement routine that can measure
four circles on a simple part. This tutorial uses the Hexagon test block
(Hexblock_Wireframe_Surface.igs).

Create a measurement routine that measures four circles, similar to this.

Step 1: Create a Blank Report Template

1. Select File | Reporting | New | Report Template to access the Report Template
Editor. A blank report template automatically appears.
2. To hide any unused toolbars, right-click on the toolbar area and remove them.
3. To hide any unused PC-DMIS windows, select the open window from the View
menu.
4. Click the maximize button on the editor's window to maximize the template
editor. You should see the words "REPORT" on the background of the editor,
and your editor should have a "Section1" tab at the bottom. Your Report
Template Editor should now look something like this:

203
Reporting Measurement Results

Step 1: Report Template Editor

When working with one of the template editors, you may find it helpful to hide
your usual PC-DMIS toolbars and windows, thereby freeing up some screen space. If
you work frequently with templates, you may want to create a stored screen layout for
your template. For information on layouts, see the "Window Layouts Toolbar" topic in
the "Using Toolbars" chapter.

In addition, you may find it useful to create your own toolbar with the File | Reporting
commands on it. For information on how to create custom toolbars, see the
"Customizing Toolbars" topic in the "Customizing the User Interface" chapter.

Step 2: Insert and Format a Text Object for a Section Title

1. From the Object Bar, click on a Text object.


2. Insert it into the report by dragging a rectangle onto the current section. When
you release the mouse, the object is selected, as shown by small green squares,
called handles, at each corner of the object.

204
Creating Templates

A sample Text object showing handles

3. Select the Text object you inserted, and drag the green handles so that it has a
height of 1 inch and a length of 6 inches. Use the Ruler Bars on the top and left
border of the editor as needed. Select View | Ruler Bars if the rulers aren't
available.
4. Right-click on the Text object.
5. Select the BackColor property and change it to a light blue color (0.255.255).
6. Click the ForeColor property and change it to a dark blue color (0.0.128).
7. Select the BorderStyle property and change it to Normal.
8. Click the LineWidth property and change the value to 5.
9. Click the Text property and change it to "A Custom Report".
10. Click the Font property. The Font dialog box appears.
11. Change the Size to 20, the Font Style to Bold, and the Font to Arial.
12. Click OK.

You have formatted your text object. It should look similar to this:

Step 3: Make Properties User Assignable

1. Select the Text object you created in the previous step.


2. Right-click on the object. This causes the Properties dialog box for that object to
appear on the right side of the editor. On the left side of the dialog box you will
see check boxes next to most properties. These check boxes determine what
properties you can make user definable.

205
Reporting Measurement Results

Sample Property Sheet for a Text object. Notice the user definable check boxes
on the left.

3. Select the check box to the left of the Text property. A User Assigned Property
dialog box appears, asking you to determine the message that will prompt the
user for the property value and when the user should be prompted.

User Assigned Property dialog box

4. In the Prompt box, type "Type Your Report's Title Now".


5. Select the Prompt when executing Measurement Routine option.
6. Click OK. The User Assigned Property dialog box closes.
7. Select the check box to the left of the BackColor property. In the resulting dialog
box, type "Choose Your Background Color Now" for the prompt, and once more,
choose the Prompt when report is executed option.

206
Creating Templates

8. Click OK. The User Assigned Property dialog box closes.

In this step, you selected two properties and made them "user assignable". This means
whoever executes your measurement routine will be able to set these properties.

Step 4: Add a TextReportObject

1. From the editor's Object Bar, click on the TextReportObject icon . Your
mouse pointer will change from an arrow pointer to a cross.
2. Add the TextReportObject on the template by dragging a box on your template's
section. PC-DMIS automatically adds some default filler report text. When you
apply this template to your report, PC-DMIS will use your actual report data. This
filler text simply helps you understand what your design will look like. Your object
should look something like this:

Sample TextReportObject

3. Size the object so that it’s close to the width of the Text object you added earlier.
You can size the object by clicking and dragging one of the green boxes (or
"handles") surrounding the object.
4. Select the Text object you added earlier. Hold down the Shift key and select the
TextReportObject. This selects both objects.
5. With both selected, use the Layout Bar, and click the appropriate Make Same
Size and Align Center icons to make the objects the same width and to align
them so that they are centered in between the left and right sides of the editor.

Your template should now have a TextReportObject on the first section.

207
Reporting Measurement Results

Step 5: Add a New Section to the Template

1. Make sure your Report Template Editor window is maximized.


2. Scroll to the very bottom of your template.
3. Right-click on the Section1 tab.
4. Select Add Tab from the shortcut menu. PC-DMIS inserts a new section,
Section2, into your template.

Your template should now have two sections, like this:

Step 6: Add a CADReportObject

1. Click on the Section2 tab to make that the active section.

2. From the editor's Object Bar, click on the CADReportObject icon . Your
mouse pointer changes from an arrow to a cross.
3. Add the CADReportObject on the template by dragging a box on your
template's section. Size the box so that it measures about 6 inches wide and 4
inches tall. You can size the object by clicking and dragging one of the green
boxes surrounding the object.
4. When you finish drawing the box, PC-DMIS automatically displays the Label
Layout Wizard. This wizard shows a fake part surrounded by some fake labels.
These dummy items are simply design aids while working in the template editor.
You can use this wizard to set up labels around your part. For in-depth
information, see the "The Label Layout Wizard" topic. When you apply this
template to your report, PC-DMIS uses your actual CAD drawing and label
information.
5. Change the Label Count box number of labels to 4.
6. Change the Layout Style to Elliptical Packed.

208
Creating Templates

7. Click on the small, square, white handle in the middle of the CAD drawing, and
drag the square clockwise or counterclockwise to rotate the labels along the
elliptical path.
8. Rotate the labels until all four are above the CAD drawing and the Layout
Preview area of the Label Layout Wizard looks like this:

Layout Preview area showing four labels elliptically packed above the CAD
drawing

9. Click OK. PC-DMIS inserts the object into Section2.

Your Section2 layout should now contain a CADReportObject looking something like
this:

Example CAD report object showing the four dummy labels above the dummy part

209
Reporting Measurement Results

Step 7: Define What Measurement Information Should Appear

1. Click on the Section1 tab and right-click on the TextReportObject you inserted
earlier.
2. From the Properties dialog box, change these properties:
ShowAlignments - OFF
ShowComments - OFF
ShowDimensions - None
ShowFeatures - ON
ShowHeaderFooter - OFF
ShowMoves - OFF
ShowScreenCaptures - OFF
3. Click on the Section2 tab.
4. Right-click on the CADReportObject you added into Section2. The right part of
the screen displays a docked Properties Sheet dialog box. This dialog box
contains various properties specific to the selected object.
5. Click on Rules in the Rules Tree property. The Rule Tree Editor appears:

Rule Tree Editor dialog box

210
Creating Templates

Rules Tree property

6. Expand the Features heading. A list of features appears.


7. Expand the Circles heading. A list of various circle features appears.
8. Click the Measured Circle item, and then click the Add button. This tells PC-
DMIS you are adding a rule that you want the template to follow. The Edit Rule
dialog box appears. This dialog box allows you to make decisions for your report
template. In this case, you are telling your report template to do something when
it encounters measured circles in the measurement routine's report data.

Edit Rule dialog box

9. Select the Use Label Template for Report option. The Label Name box
becomes available for edit.
10. Click the ... button. An Open dialog box appears, allowing you to select a label
template file.

211
Reporting Measurement Results

11. Navigate to where you installed PC-DMIS, and open up the Reporting sub-
directory. Select the summary.lbl label, and click Open. In the Edit Rule dialog
box, PC-DMIS displays the name of the template you selected. See "About
Labels and Label Templates" for information and a tutorial on creating labels.
12. Click OK to close the Edit Rule dialog box and apply the rule. You will notice that
the Measured Circle item in the list has a bold font to indicate that a rule exists
for that feature type.
13. Click OK to close the Rule Tree Editor dialog box.

You have created a rule that tells PC-DMIS to use the summary.lbl label template to
display summary information about the measured circle feature type.

Step 8: Save and Test the Template

1. Inside the Report Template Editor, select File | Save. In the Save As dialog box,
save the template as test1.rtp.
2. Select File | Close to close the Report Template Editor.
3. Select View | Report Window. The Report window appears, showing the default
report template.
4. From the Reporting toolbar on the Report window, click the Template Selection
Dialog icon . The Report Templates dialog box appears
5. Add your report to the Report Templates dialog box by clicking the Add button.
6. Navigate to and select test1.rtp. Then click Open. PC-DMIS adds a thumbnail
view of your report into the Report Templates dialog box.

Report Templates dialog box showing Test1.rtp

212
Creating Templates

7. Select your template's thumbnail icon, and click Open. PC-DMIS opens the
Report window using your newly created template. It should look something like
this:

Report Window Showing Report Data Using the Test1.rtp Report Template

8. Finally, execute your measurement routine. The first time you execute the
measurement routine using this report template, PC-DMIS will display a Define
User Assigned Properties dialog box, asking you to give the report a new title
and to set the background color.
9. Set these properties as desired, and click OK. The dialog box closes and PC-
DMIS runs your measurement routine.
10. When execution finishes, PC-DMIS shows the report data with the new template.

Congratulations! You have finished the Custom Report Template tutorial.

213
Reporting Measurement Results

Applying or Removing a Report Template


To apply a report template to your measurement results, or to remove a report template,
you must first access the Report Templates dialog box:

To Access the Report Templates dialog box:

1. Select View | Report Window to access the Report window.


2. From the Report toolbar on the Report window, click the Template Selection
icon . The Report Templates dialog box appears showing available report
templates as .rtp files:

Report Templates dialog box

You can use this dialog box to manage your report templates.

To Add a Report Template:

1. From the Report Templates dialog box, click the Add button. A standard Open
dialog box appears.
2. Navigate to the report template file, select it, and click Open.
3. PC-DMIS adds the template, and a thumbnail picture of the template will appear
in the Report Templates dialog box.
4. Your dialog box might contain few or many templates. To resize the dialog box to
better suit your needs, drag the dialog box's edge to a new location.

214
Creating Templates

To Remove a Report Template:

1. From the Report Templates dialog box, select a template.


2. Click the Remove button (to remove all templates, click Remove All).
3. PC-DMIS removes the report template from the Report Templates dialog box.

Removing report templates doesn't delete them. It merely removes them from
this dialog box. You can always add them later using the Add button.

The templates listed in the Report Templates dialog box are different for each user
account on the Windows operating system.

Sharing Report Templates


You can easily share a report template with other users. When you save a report
template, PC-DMIS automatically saves a copy of any associated label templates into
the report template itself. This way, if you want to share a report template, you don't
have to worry about sending all the associated label templates along with it. Even so,
the report template will always check for the actual label template file in the directory
first. If it finds the actual label template file, it will use that. If the actual label template file
doesn't exist as expected, then the report template will use the copied version of the
label template file that is stored with the report template itself.

215
Reporting Measurement Results

1 - In this example, the report template calls two label templates, label A and label B.

2 - The label template files (files with a .lbl filename extension) are stored in the
Reporting directory (C:\Users\Public\Documents\Hexagon\PC-
DMIS\<version>\Reporting).

3 - When you save the report template, copies of the label templates are stored within
the report template.

4 - When used, the Report template first looks for any label template files and uses
those if found. If none is found, it then uses the copied label templates.

About Labels and Label Templates


A label template essentially acts like a mini-report template that you associate with a
specific command (or commands) in the report. This gives you a lot of freedom with
data that you can include in your report. For example you can display labels for
dimensions, labels for measured features, for auto features, and so forth.

216
Creating Templates

Example label housing a Position table with a Feature Control Frame (FCF)

PC-DMIS ships with several standard labels that you can associate with objects in your
Report templates. However, as with Report templates, you can create your own label
templates as well. Label templates can contain any object from the Label Template
Editor's Object Bar, but they usually contain the GridControlObject or the Graph
object.

The Label Template Editor is used to create label templates.

Tutorial - Creating Label Templates


This topic walks you through a basic tutorial to create a simple label template with a few
objects and a GridControlObject. This provides you with a basic overview of how label
templates work and how to use them to display custom information in your reports.

This tutorial builds on skills you learned in the "Creating a Custom Report
Template" tutorial; be sure to complete that section first.

Step 1: Create a Blank Label Template

1. Select File | Reporting | New | Label Template to access the Label Template
Editor. A blank label template automatically appears.
2. To hide any unused toolbars, right-click on the toolbar area and remove them.
3. To hide any unused PC-DMIS windows, select the open window from the View
menu.
4. To maximize the template editor, click the Edit window's maximize button .
You should see the words "LABEL" on the background of the editor.

217
Reporting Measurement Results

5. Size The Frame/The View in the label template editing area to 4 inches wide
and 1.5 inches high. You can do this by dragging on the bottom right hand corner
of the label template and dragging the mouse. Use the rulers as a guide.

You have created a blank label template. When finished with this step, it should look
something like this:

Label Template Editor

When working with one of the template editors, you may find it helpful to hide
your usual PC-DMIS toolbars and windows, thereby freeing up some screen space. If
you work frequently with templates, you may want to create a stored screen layout for
your template. For information on layouts, see the "Window Layouts Toolbar" topic in
the "Using Toolbars" chapter.

Step 2: Add a CommandTextObject and Static Information into the


Template

1. Click the CommandTextObject icon . The pointer changes to a cross-hair.

218
Creating Templates

2. Using the pointer, drag a box so that it stretches about 3 inches wide by .5 inches
high. A CommandTextObject gets inserted into your label template. Right-click
on it to access the Properties dialog box.
3. Click the Colors property. If PC-DMIS asks if you want to define a color set
independent from the default application colors, click Yes.
4. The Color Editor appears. PC-DMIS uses this editor to define Edit window
colors. However, in this case, it will only affect the current CommandTextObject.
5. Under Background Color, click Edit. A standard Color dialog box appears.
6. Give the object's background color a dark blue color. Change the values in the
Red, Green, Blue boxes to 0, 0, 128 respectively to do this. Click OK.
7. In the Unmarked box, click Edit. A standard Color dialog box appears.
8. Select white, and then click OK. If PC-DMIS asks if you want to change the
item's children, click No.
9. Use a bitmap image of a circle (or use the Ellipse object to draw a circle) and
place it in the top right of the canvas.

You have added the CommandTextObject and a static Bitmap or Ellipse object for a
circle shape into the label template. At the end of this step, your label template should
looks something like this:

Label Template showing the CommandTextObject and a static Bitmap object

Step 3: Insert and Format a GridControlObject

1. Click the GridControlObject icon . The pointer changes to a cross-hair.


2. With the pointer, drag a box for this object under the previously inserted
CommandTextObject, so that it has the same width.
3. Size the height so that it nearly fills the rest of the canvas. When inserted, the
grid will show several rows and columns.
4. Access the object's properties, and then change the Columns and Rows
properties to 3 each.
5. Select the object and select a cell. To do this, double-click on the first cell in the
top row. It will highlight the cell in a blue background to show that you have
selected it.

219
Reporting Measurement Results

6. Select the entire top row. To do this, with the first cell selected, press the Shift
key, and then click on the last cell in that row to select the entire row. PC-DMIS
highlights the entire row.
7. Right-click the GridControlObject. The object's dialog box appears. This dialog
box lets you control the formatting of the selected cells as well as insert text and
expressions.

The GridControlObject's dialog box

8. Click the Merge button to merge the selected cells.


9. Set the background color for the merged cell. Click the Background color
button. A Color dialog box appears. Choose a dark blue color and click OK.
10. Set the text color for the merged cell. Click the Text color button, and select
white in the same way.
11. To create headings, select the first cell in the second row, and right-click to bring
up the dialog box. In the Cell Expression box, type "Measured X". Close the
dialog box, and repeat the process on the second cell, typing "Measured Y".
Finally, repeat it again for the last cell, typing "Measured Z".
12. Select the entire second row. Right-click and use the dialog box to select a light
green background color.
13. Under Cell Justification, under Vertical, click the middle button to vertically
center the text in their cells.
14. Click OK to close the dialog box and then deselect the object.

220
Creating Templates

You have inserted a GridControlObject and learned how to change the number of rows
and columns. You learned how to add text into a cell and how to format the grid by
using this object's special dialog box. When finished with this step, your label template
should look something like this:

Label showing the inserted and formatted GridControlObject

Step 4: Add Expressions Into the GridControlObject

1. Select the GridControlObject's first row.


2. Once it's selected, type "=ID" directly into the cell. This is an expression that tells
PC-DMIS you want to display the feature's ID in the cell.
3. Select the first cell in the third row and type "=MEAS_X"
4. Select the second cell and type "=MEAS_Y".
5. Select the third cell and type "=MEAS_Z". These expressions tell PC-DMIS you
want to display the feature's X, Y, and Z values. When you deselect the object,
PC-DMIS displays the expression values from the filler text used by the object.
See "About Report Expressions" for information on expressions.
6. With the Border object, draw a border object around the label. You may need to
resize the label to close to 4.5 inches wide by 2 inches high.
7. Right-click the border, and give it a line width of 2.
8. Adjust the location of the contents so they are within the border.

You have added some report expressions into your label template and then drew a
border around the template prior to testing it. When you finish this step your template
should look something like this:

Label showing the results of the expressions

221
Reporting Measurement Results

Step 5: Save and Test the Label Template

1. Select File | Save to save the label template. In the Save As dialog box, name
the template "TestLabel.lbl".
2. Select File | Close to close down this template editor.
3. Select File | Reporting | Edit | Report Template and then select the Test1.rtp
template file you created from the previous tutorial.
4. Select the TextReportObject you inserted into the first section of the report
template and then access its properties.
5. Use the Rules Tree Editor and the Edit Rule dialog boxes to create a rule that
will display TestLabel.lbl in that TextReportObject object for all measured circles.
If you can't remember how to create rules, follow the procedure in the "Defining a
Rule topic".
6. Select File | Save to save the report template.
7. Select File | Close to close it.
8. Execute the measurement routine and apply the template.
9. Select View | Report window to display the final report.

After you save and test your label template, it should look something like this:

Report window example showing the newly created label. Notice the measured X,Y,
and Z center point data for each circle feature.

222
Creating Templates

Step 6: Create a Repeating Row

So far, your label displays the XYZ of your circles' centers. Suppose, however, you
wanted to get individual hit data instead. You can do this using repeating rows.

1. Select File | Reporting | Edit | Label Template. Select TestLabel.lbl from the
dialog box and click Open. PC-DMIS loads the Label Template Editor and
displays TestLabel.lbl.
2. Access the GridControlObject.
3. Select the first cell in the third row. Once you select it, right-click to bring up the
GridControlObject's dialog box.
4. Click the Row tab.
5. Select the Repeating Group check box. This tells PC-DMIS that you want to
make that row repeatable. The Repeat Expression dialog box becomes
available. Notice that the row, at this point, contains orange markers on the left
and right sides. This indicates that the row is a repeating row.

A row showing orange markers

6. Type "=N_HITS" in the Repeat Expression box. This tells PC-DMIS to get the
total number of hits in the feature and to repeat the row for each available hit.
7. Click the Cell tab. You should see "=MEAS_X" in the Cell Expression box.
Append ":N" to the expression so that it reads, "=MEAS_X:N". This tells PC-
DMIS to repeat the expression in that cell for each available hit.
8. Select the other two cells in the row, and modify them so that they have the ":N"
code added as well: "=MEAS_Y:N" and "=MEAS_Z:N".
9. Because the labels will expand to include all the data passed into the
GridControlObject, when the row repeats, you do not need to adjust the label's
size for this.
10. Click OK to close the GridControlObject's dialog box.
11. Save the label template and access the Report window. Click the Redraw the
Report icon from the Reporting toolbar to see your latest changes. Notice that
instead of displaying the center point data for the circles, PC-DMIS displays
individual hits.

You have learned how to create a basic repeating row to count and display several
items of data without needing to create different report templates with different row
configurations.

223
Reporting Measurement Results

Step 7: Use the Columns Tab to Define Columns

1. Access the TestLabel.lbl label template, and select the existing


GridControlObject.
2. Select its first row. Once selected, right-click to bring up the GridControlObject's
dialog box.
3. Click the Unmerge Cells button. The single cell making up the first row now
becomes three cells.
4. Delete the "=ID" expression text in the first cell. You don't really need this
expression in your final label template because the CommandTextObject
displays it automatically.
5. Use the Background Color and Text Color buttons to change the cell's
background color to white and its text to black.
6. Delete the inside column lines in the first row. To do this, select the first cell,
access the dialog box, in the Cell tab, in the Lines area, change the line value of
the Right list from Thin to None. Repeat this for the middle cell as well.
7. Click OK to close the GridControlObject's dialog box. While your label template
may appear to have its cells merged, in reality, column lines in those cells are
merely hidden.
8. Select the left cell in the first row and access the dialog box.
9. Click the Column tab. In the Column list box, type "Measured X". Click OK to
close the GridControlObject's dialog box.
10. Repeat this for the middle and right cells, typing "Measured Y" and "Measured Z"
respectively. You will use these column headings to control each columns
visibility and ordering later on.
11. Select the CommandTextObject you added to the template earlier, and drag it
down so that it rests on top of the GridControlObject's first row.
12. Modify the location or size of the Ellipse or circle Bitmap object you created
earlier so that it's centered along the right side of the GridControlObject.
13. Select and then drag the top line of the Border object down so that it's just above
the GridControlObject.
14. Drag a box around all the objects in the label to select them all. Then drag those
objects up to the top and to the left as far as they will go on the label's canvas.
15. Right-click to access the GridControlObject's properties.
16. Type "TestTableFormat" in the Table Format property, and press TAB.
17. Save and close your label template.

In this step, you learned how to unmerge cells, set cell line properties, insert column
headings, and select and move multiple objects. Defining column headings will let you
control the visibility and ordering of your columns on the fly. When you have finished
this step, your label template should look something like this:

224
Creating Templates

Step 8: Define a Grid Format Table

1. Open the report template, Test1.rtp, in the Report Template Editor.


2. Select the TextReportObject, and right-click to access the Properties dialog box.
3. In the Rules Tree property, click Rules to access the Rule Tree Editor dialog
box.
4. Use the Rule Tree Editor and navigate to the rule you created earlier.
5. Select the rule and click Edit. The Edit Rule dialog box appears.
6. Click the Grid Format button. The Table Format Properties dialog box appears.
7. In the New Table Name box, type "TestTableFormat", and click Add Table.
8. Under the Columns list in the edit box, type "Measured X", and then click Add
Column.
9. Add columns for "Measured Y" and "Measured Z" in this same manner.
10. Click OK on the various dialog boxes until your return to the Report Template
Editor.
11. Select File | Save to save the report template.
12. Select File | Close to close the Report Template Editor.

In this step, you tied the GridControlObject's columns to the TestTableFormat table in
the Table Format Properties dialog box by adding columns with the exact same name
and naming the table the same name you gave the Table Format property. Since you
haven't changed the order or visibility at this point, the newly created table in the dialog
box should look like this:

225
Reporting Measurement Results

Table Format Properties dialog box showing the newly created TestTableFormat table

Step 9: Use Table/Format Command to Control Column Visibility and Order

1. If the Edit window is not visible, select View | Edit Window to display the Edit
window.
2. Place the Edit window in command mode.
3. Select Insert | Report Command | Table Format. The Table Format
Properties dialog box appears.
4. From the Table ID list, select the TESTTABLEFORMAT table. The Columns
area shows the columns available to this custom table format.
5. Clear the Measured Z box to hide that column in the final report.
6. Select Measured Y and click the up arrow icon next to the Columns area to
reorder the Measured Y column so that it gets displayed first in the report.
7. Click OK. PC-DMIS inserts a command into the Edit window. This command
controls the visibility and order of your columns.

TABLE/FORMAT,TESTTABLEFORMAT
COLUMN/ORDER,MEASURED Y,MEASURED X, ,
ROW/ORDER

8. Save and execute your measurement routine. When PC-DMIS runs, notice that
the order of the Measured X and Measured Y values have changed, and the Z
column is hidden
226
Creating Templates

In this final step, you learned how to insert and use a TABLE/FORMAT command to
define the order and visibility of the columns in the label template. Your finished report
should look something like this:

Finished report showing only the Measured Y and X columns

Using Labels in Reports


To use labels with your reports, you need to open a report template and add at least
one of these objects:

• Label
• TextReportObject
• CadReportObject

Once an object exists, right-click on it to access its Properties dialog box. Finally, use
the Rules Tree Editor to define rules that use one or more label templates.

When you apply your report template, PC-DMIS follows the rules you specified and
uses the chosen label templates.

Understanding Stand-Alone Label Ordering

If you use stand-alone Label objects in your report template, be aware that, by default,
PC-DMIS fills them with measured data in the report in front-to-back order. To illustrate
this, when you add stand-alone labels, PC-DMIS defines each label by a progressive
alphanumeric ID (Label1, Label2 …LabelN where N indicates the final label number).
While label IDs don't control the order in which the labels are filled, they are discussed
here to more easily illustrate how ordering takes place. During report creation, assuming
you haven't modified the label IDs in any way, LabelN is activated and filled first, while
Label1 is activated and filled last.

227
Reporting Measurement Results

This only happens with stand-alone labels, not with labels used within the
TextReportObject or CadReportObject.

Changing Stand-Alone Label Ordering

Since PC-DMIS may not initially fill the labels in the order you would like, you can
change the drawing order of the labels to determine which labels are filled first with
menu items located on the Edit | Order submenu.

You can also use the To Front or Back icons on the Layout Bar.

After you change the drawing order, PC-DMIS fills the top most drawn label first and the
bottom most drawn label last. For example, suppose you have three large labels that fill
up a single section with Label1 at the top, Label2 in the middle, and Label3 at the
bottom. Initially, it fills up Label3 first, then Label2, and then Label1. To guarantee that
PC-DMIS displays your data in measurement routine order, you can change the
drawing order of the labels, like this:

228
Creating Templates

A Sample Report Template with Three Large Labels

1. Select Label1 and choose Edit | Order | Bring to Front.


2. Select Label2 and choose Edit | Order | Sent to Back.
3. Select Label3 and choose Edit | Order | Send to Back.

Arranging Labels in the Report Window


When the report template receives measurement routine data, it has to size the labels
dynamically to fit that data. So, these labels may not be in the best location or may
overlap other labels after measurement routine execution. However, you can modify
where to put labels, by selecting a label and then dragging it to a new location.

You can select a label in one of these ways.

• Double-click on the label.


229
Reporting Measurement Results

• Press the Ctrl key and left-click the label.


• Drag a box around the label.

The latter two methods are used to select multiple labels as well.

Using the Table Format Command


The TABLE/FORMAT Edit window command lets you control a GridControlObject's
column and row ordering and visibility on the fly from within your measurement routine.
This means you don't have to use the Label Template Editor to create different
variations of the same label template if you only want to reorder or hide certain rows or
columns. Instead, you can simply insert this command into your measurement routine to
determine how to display the GridControlObject in the label template.

For this command to work properly, you must set the value of the
GridControlObject's TableFormat property to the exact same table format name
defined in the Grid Format button of the Edit Rule dialog box.

Inserting the Command

To insert this command, select Insert | Report Command | Table Format. The Table
Format Properties dialog box appears. This dialog box, like the dialog box used in the
Rules Tree Editor, also controls the visibility and ordering of rows and columns for
label templates using the GridControlObject. When you finish manipulating the rows
and columns, click OK, and PC-DMIS inserts the TABLE/FORMAT command into the
Edit window.

An inserted TABLE/FORMAT command takes precedence over any ordering you may
have already defined with the Edit Rule dialog box's Grid Format button.

About the Rule Tree Editor


The Rule Tree Editor dialog box lets you define rules–or conditions and responses–
that certain objects follow when displaying report information. For example, you may
only want to show roundness dimension information for circle features in your report,
even though your measurement routine contains many other features. You can do this
by using this editor. In your report template, you might add a CadReportObject and
then access the Rule Tree Editor for that object. Inside the editor, you can then specify
a circle feature type and then select a label template that is programmed to display
roundness data.

230
Creating Templates

Rule Tree Editor dialog box

Supported Objects:

The Rule Tree Editor works with these objects available from the Report Template
Editor:

• TextReportObject
• CadReportObject
• Label Object

It also works with Page object available within the Custom Report Editor. Only these
objects can access data from a measurement routine using the Rule Tree Editor.

Accessing the Rule Tree Editor:

1. Insert a supported object into your report template, or select the Page object in
the Custom Report Editor.
2. Right-click on the object.
3. Click on Rules next to the RuleTree property. The Rule Tree Editor dialog box
appears.

231
Reporting Measurement Results

Defining a Rule in the Rule Tree Editor


To use the Rule Tree Editor dialog box to define a rule, follow this procedure:

1. Select File | Reporting | New | Report Template to access the Report Template
Editor.
2. Add a TextReportObject, CadReportObject, or a Label object onto the
template.
3. Right-click on the object. A Properties dialog box appears.
4. Select the Rules Tree property from the Properties dialog box. The Rule Tree
Editor dialog box appears. The dialog box displays a list of various items that
make up a measurement routine. To expand many of these items, click on a plus
symbol (+) to view more specific items or commands. Some items exist on their
own and aren't inside of any expanding lists; these items include:

Rule Tree Editor dialog box

• Top of First Page in Section - You can use this item to select a label or
text expression to display at the top of the first page in the current section
of your Report window.
• Bottom of Last Page in Section - You can use this item to select a label
or text expression to display at the bottom of the last page of the current
section.

232
Creating Templates

• File Header - You can use this item to select a label or text expression to
display in the place of the usual report's file header of PART NAME, REV
NUMBER, SER NUMBER, and STATS COUNT. The File Header label or
text appears on the first page in the current section of your report.

5. Define the conditions to be met.


• From the list of items, find an item that you want to define as a
condition.
• Select the item, and click Add. The Edit Rule dialog box appears.

Edit Rule dialog box

• If you want to define another condition, you can choose either a


reporting language expression or a BASIC script as your condition. To do
this, select the Use Additional Expression or Script check box, and then
in the Conditional area, select either the Expression or Script option.
o If you select Expression, type the expression for your
condition into the Conditional Expression box. For example, to
create a rule for a measured circle, you can test any of the circles
data type field values to control whether or not to display a label.
Suppose you only want to display a label if the measured circle has
less than four hits. In the Conditional Expression box, you would
type:

N_HITS < 4

233
Reporting Measurement Results

Then, if this condition evaluated to TRUE, PC-DMIS would use the


associated label. Note that you don't need to include the entire IF
expression statement. The IF statement is already understood and
evaluated in this box.

o If you selected Script, click the Edit button to create your


BASIC script. A VBS Mini-editor appears where you can type your
code. Create your script inside this code editor. The script must
return TRUE for the condition to be met. When finished, right-click
and select Check Syntax. Click OK when finished. PC-DMIS
automatically stores the script with the defined rule.

If the rule ever gets deleted, your script is lost. Store your
script in a separate text file if you are concerned about it getting
deleted.

6. Define a label, an expression, or nothing at all to display if the condition or


conditions defined are met. With the Edit Rule dialog box open, you can choose
one of the following:
• Use text expression for report
o If you chose to use a text expression, type a simple text message,
or define an expression, in the Text Expression box. For example,
whenever PC-DMIS measures a circle, you can type static text
such as:

"We just measured a circle!"


o Or, you could use expressions to include information about the
circle, such as:

"We just measured a circle! It had " + N_HITS + "


hits!"
• Use label template for report
o If you chose to use a label template, select a label template. Note
that this field also accepts expressions as long as the expression
evaluates to a label template name. Remember, if you use an
expression in this field, be sure to precede it with the "=" symbol. If
desired, click the Grid Format button to access the Table Format
Properties dialog box. Using this dialog box, you can define a grid
format for your report. A grid format lets you reorder or hide your

234
Creating Templates

columns and rows without creating a brand-new label template.


Additionally, defining a grid format also lets you use the
TABLE/FORMAT Edit window command to control row and column
ordering from within the measurement routine. See "Using the
Table Format Properties Dialog Box".
• Use nothing
o If you chose to use nothing, then PC-DMIS displays nothing for that
condition. You may find this useful if you don't want to output
anything for a specific feature, command, or condition. Use
nothing only applies to the TextReportObject.

7. When you have filled out the Edit Rule dialog box, click OK. PC-DMIS places the
item from the list in a boldface font and inserts the rule for that item at the bottom
of the Rule Tree Editor dialog box.
8. Organize your rules. You can have as many rules as you want for a given
command type. If you have more than one rule, PC-DMIS will evaluate the rules
in the order that they appear. You can change the evaluation order by selecting a
rule and clicking Move Up or Move Down in the Rule Tree Editor dialog box.

• You can copy and paste rules from one item to another item, to multiple
items, or to an entirely different tree by using the Copy and Paste buttons.
See "Copying and Pasting Rules".
• You can remove rules from an individual item by clicking Delete or Clear. If
you want to remove the rules for multiple items, you can select them and
click Clear. See "Clearing Rules"

9. Click OK to save the changes you made to the Rule Tree Editor.
10. Test the rule.
• Save the report template.
• Apply the report template to the report data by using the Reporting
toolbar on the Report window.
• Execute the measurement routine.

235
Reporting Measurement Results

Be aware that a rule assigned to a child element always overrules a rule


assigned to a parent element. Also, a rule assigned to a parent node applies to each
child element of that node that does not contain its own rule.

Importing and Exporting Rules


If you work in a collaborative environment, you will probably want to share rules that are
created from different report templates with each other. Using the Rules Tree Editor
dialog box, you can easily do this and import someone else's rules by using the Import
button, or you can share your own rules with someone else by using the Export button.

A rules file has a ".rul" filename extension.

Importing a Rules File:

1. Access the Rules Tree Editor dialog box.


2. Click the Import button. An Open dialog box appears.
3. Navigate to the directory containing the rules file (.rul) you want to import.
4. Click Open. PC-DMIS imports the rule file into the Rules Tree Editor.
5. Click OK to save the imported rule.

Exporting to a Rules File:

1. Access the Rules Tree Editor dialog box.


2. Click the Export button. A Save As dialog box appears.
3. Navigate to the directory where you want to store the rules (.rul) file.
4. Type a name for the file In the Filename box.
5. Click Save. All rules associated with that object get exported. Someone else can
now import and use your exported rules file.

Copying and Pasting Rules


The Rule Tree Editor contains Copy and Paste buttons so that you can copy and
paste rules between the current Rule Tree Editor and a Rules Tree Editor for a
different object or to a different item within the same Rule Tree Editor.

236
Creating Templates

A copied rule is not stored in the Windows Clipboard; so you cannot copy and
paste a rule outside of the specific context discussed here.

To Copy and Paste Rules:

1. Select a single item from the Rule Tree Editor. If you select more than one item
from the tree editor, the Copy button will never become enabled.
2. Select one or more rules from the rule list box. The Copy button becomes
enabled for selection.

Example of Copying Two Rules

3. Click Copy.
4. Select and highlight one or more items from a rule tree. Hold down the CTRL key
while clicking to select multiple items. The Paste button becomes available.

237
Reporting Measurement Results

Example of Pasting Copied Rules into an Empty Item

5. Click Paste to paste the copied rule(s) into the selected item(s). Note that if you
paste a copied rule or rules into an item that already contains one or more rules,
the existing rules are not overwritten by the new rules, but the new rules are
instead appended to the existing list. You can click Paste multiple times into
several different rule tree items.
6. Click OK on the Rule Tree Editor to save your changes.

Clearing Rules
The Clear button removes any rules associated with one or more selected items from
the Rule Tree Editor. You can select more than one item by pressing the CTRL key
while selecting additional items.

238
Creating Templates

Example of Clearing Rules for a Selected Item

Using the Table Format Properties Dialog Box


The Table Format dialog box works with a GridControlObject's defined column and
row names, which enables you to control the visibility and order of columns and labels
in a GridControlObject in a label template. To access this dialog box, from the Edit
Rule dialog box, click the Grid Format button. For information on the Edit Rule dialog
box and the Grid Format button, see "Defining a Rule in the Rule Tree Editor".

239
Reporting Measurement Results

Table Format Properties dialog box

This dialog box contains different table formats. A table format simply defines how you
want named rows and columns to appear in your final report. This dialog box lets you
change the order and visibility state of all existing table formats. You can also use this
dialog box to create your own custom table formats.

For the pre-existing table formats, the only thing you can modify is their
visibility state and the order of their rows or columns. You cannot delete these table
formats nor change what rows or columns they have.

To use table formats, you must first use a label template with a GridControlObject that
has its columns or rows already named.

The following properties are available:

Table ID
Lists all available table formats.

New Table Name


Defines a new table format.

Add Table
Adds the new table format. This button only becomes enabled when you type a
name in the New Table Name box.

240
Creating Templates

Delete Table
Deletes the selected custom table format. This button only becomes enabled
when you select a custom table from the Table ID list.

Rows
Lists the rows and columns in your table format. You can reorder them by clicking
the up and down arrows.

Add Row/Column
Adds a row or column name to the Rows or Columns area. You can only add to
custom table formats.

Delete Row/Column
Deletes the selected row or column from the Rows or Columns area. You can
only delete items from custom table formats.

Resize Type
Determines what the table will when you show or hide columns. The list contains
three items:

Resize Grid - This retains existing column sizes and resizes the grid to fit
the new width.

Resize Columns to Fit - This retains the grid's existing width and resizes
each column equally to fit that width.

Hide Text - This doesn't resize the grid or the columns. It simply hides the
text.

Cancel
Closes the dialog box without applying any changes.

OK
Uses the selected table format for the rule in the Rule Tree Editor or for the
TABLE/FORMAT command in the Edit window.

To name a column or row in a GridControlObject:

1. In the Label Template Editor, select the GridControlObject.


2. Double-click on the first cell in a column or row.
3. Right-click to access the property editor.
4. Click either the Cell or Column tab.

241
Reporting Measurement Results

5. In the Row Label box or Column Label box enter a value. You can select from
the list or type a custom value. Custom labels can only show up on custom table
formats.

To reorder columns or rows:

1. Select a table format from the Table ID list.


2. Its rows or columns already appear.
3. In the Rows or Columns area, select the row or column you want to reorder,
then click the up or down arrow buttons to either send that item either up or
down in the list. Items higher in the list get displayed before others.

To show/hide columns or rows:

1. Select a table format from the Table ID list. Its rows or columns already appear.
2. In the Rows or Columns area, clear the check box to the left of the row or
column name to hide that item in the label. Select the check box to show it in the
label.

To create a custom table format:

1. In the New Table Name box, type a name.


2. Click the Add Table button. The custom table appears in the Table ID list and
remains until you delete it.
3. In the Add Row or Add Column box, type a name that matches a row or column
label name you gave to the GridControlObject.
4. Click Add Row or Add Column to add that item to the table.
5. Continue adding row or columns and deleting or rearranging them as desired
until the table format contains the information you want.

Removing your Modifications

To quickly remove a modification, right-click on the desired report object (a


TextReportObject, CADReportObject, or Label object), and select the Remove Object
Modifications button.

242
Creating Templates

PC-DMIS returns the report object back to its default state.

Changing a Template's Preview Thumbnail Icon


Whenever you create a report or label template, PC-DMIS automatically creates a
thumbnail-sized preview of that template based on what appears on the template's initial
page or section.

This thumbnail preview appears whenever you attempt to edit a template and access
the Open dialog box (Select File | Reporting | Edit | Report Template or Label
Template).

A sample Open dialog box showing several report template preview icons

If you want to use a custom image file instead of the default generated preview for a
template, you can do this within the Open dialog box.

To Change a Template's Preview Thumbnail:

1. Select the template file from the Open dialog box.


2. Click the Change Preview button. The Template Image Selection dialog box
appears.

243
Reporting Measurement Results

Template Image Selection dialog box

3. Select the Select Image from File option button.


4. Click OK. Another Open dialog box appears allowing you to select a preexisting
image file.
5. Navigate to the directory containing either a .bmp or .jpeg file, select the image
file, and click Open. PC-DMIS uses the selected image for your preview.

An example showing Test1.rtp with a bitmap preview image

Saving a Template or Form to an Earlier Version


You can save your report templates, label templates, or forms so that they are
backwards compatible with earlier PC-DMIS versions that also support template
reporting.

To do this:

1. Open the desired report or label template inside its respective editing
environment (the Report Template editor, the Label Template editor, or the Form
Editor).
2. Select the File | Save As menu item to open the Save As dialog box.

244
Creating Templates

3. Near the bottom of the dialog box, use the list under the Save as type list to
specify the version. The earliest version you can save these items back to is
version 4.2 MR2. Select the desired version and click Save.

If you use the File | Save menu item, PC-DMIS automatically saves the item
to your current running version of PC-DMIS, even if it was saved to an earlier version
previously.

Tutorial - Customizing a Report Template


Most of the time, you won't need to create a brand-new report template from scratch,
but instead will want to create a new template based on an existing template that ships
with PC-DMIS.

For example, suppose that you have ballooned (or numbered) prints, and you want the
ballooned numbers to appear in your final report, such as in the Item column in the
PPAP report (as shown below).

How do you get ballooned data into the PPAP template?

Perhaps feature #15 on the print is the X dimension for a hole, feature #30 is the Y
dimension, and feature #75 is the hole's diameter. How do you get this information into
the Item column in your final report? One way is to configure the PPAP and label
templates to pull the information from variables in your measurement routine.

This tutorial shows how to make copies of the PPAP report and label templates. It then
demonstrates how to modify them so that the information that appears under the Item
heading displays variables taken from your measurement routine, instead of the normal
sequential list of numbers that appears in the PPAP report.

245
Reporting Measurement Results

This tutorial uses skills learned in the "Creating a Report Template" and
"Creating Label Templates" tutorials. You should complete those tutorials first so that
you have a proper foundation for this tutorial.

Step 1: Copy the PPAP Report and Label Template

The first thing you need to do is create copies of all the components used to generate
the PPAP report. These include both the report template and the underlying label
templates.

1. In the Report Template Editor, open the PPAP.RTP report template.


2. Select File | Save As.
3. Name the report template "BALLOON_PPAP.RTP".
4. Close the Report Template Editor.
5. In the Label Template Editor, open these templates, select File | Save As on
each one, and save them with a "BALLOON_" filename prefix as shown in this
table:

Existing Label Template Save As Filename


PPAP_DIMENSION.LBL BALLOON_PPAP_DIMENSION.LBL
PPAP_DIMENSION_TRUE_POSITION.L BALLOON_PPAP_DIMENSION_TRUE_P
BL OSITION.LBL
PPAP_FCF_POSITION.LBL BALLOON_PPAP_FCF_POSITION.LBL
PPAP_FCF_SIZE.LBL BALLOON_PPAP_FCF_SIZE.LBL
PPAP_FCF_SUMMARY.LBL BALLOON_PPAP_FCF_SUMMARY.LBL
BALLOON_PPAP_FCF_POSITION_LINE
PPAP_FCF_POSITION_LINE3.LBL
3.LBL
PPAP_TRUE_POSITION_INBETWEEN.L BALLOON_PPAP_TRUE_POSITION_INB
BL ETWEEN.LBL

You should now have copies of all the report and label templates used with the PPAP
report. You will customize these copies in subsequent steps.

Step 2: Modify Rules in the Report Template

Now that you have created copies of the report and label templates, you need to modify
the rules on the new report template so that the newly saved BALLOON label templates
are used instead of the usual PPAP labels.

246
Creating Templates

1. In the Report Template Editor, open the BALLOON_PPAP.RTP report template.


2. Access TextReportObject1 on the template and right-click on it to access the
properties for the object.
3. In the Properties dialog box, click Rules to access the Rule Tree Editor.
4. Expand the Dimensions list in the Rule Tree Editor. You see several
dimensions in boldface font indicating that a rule is applied to that dimension
type.
5. Select each boldface item in the Dimensions list, and modify its existing rule or
rules so that the corresponding label templates with the "BALLOON_" prefix are
used instead.

Existing Label Templates Used New Label Templates to Use


PPAP_DIMENSION.LBL BALLOON_PPAP_DIMENSION.LBL
PPAP_DIMENSION_TRUE_POSITION.L BALLOON_PPAP_DIMENSION_TRUE_P
BL OSITION.LBL
PPAP_FCF_POSITION.LBL BALLOON_PPAP_FCF_POSITION.LBL
PPAP_FCF_SIZE.LBL BALLOON_PPAP_FCF_SIZE.LBL
PPAP_FCF_SUMMARY.LBL BALLOON_PPAP_FCF_SUMMARY.LBL
BALLOON_PPAP_FCF_POSITION_LINE
PPAP_FCF_POSITION_LINE3.LBL
3.LBL
PPAP_TRUE_POSITION_INBETWEEN.L BALLOON_PPAP_TRUE_POSITION_INB
BL ETWEEN.LBL

247
Reporting Measurement Results

Changing the Label Template

6. Save the report template.

You have modified your existing rules so that the label templates with the "BALLOON_"
prefix will be used to format and display your report data.

Step 3: Add ASSIGN Statements into your Measurement Routine

Now that the rules are modified, the next thing you need to do is insert ASSIGN
statements into your measurement routine for each ballooned item. Prior to each
dimension in your measurement routine, add ASSIGN statements for each
characteristic you will display in that dimension. For example, at the beginning of this
topic, we suggested that feature #15 on the print was the X dimension for a hole,
feature #30 the Y dimension, and feature #75 the hole's diameter. If you had a
LOCATION dimension to display the X, Y, and D values (three characteristics), you
would insert these three ASSIGN statements prior to your dimension:

ASSIGN/V1[1]=15
ASSIGN/V1[2]=30
ASSIGN/V1[3]=75

These statements create an array of multiple values for the V1 variable.

Apply similar ASSIGN statements before each dimension in your measurement routine.

248
Creating Templates

• If your dimension displays only one characteristic, then you would only put one
ASSIGN/V1[#] before that dimension statement.
• If your dimension displays ten characteristics (for example, a TP FCF
dimension), then you would need ten ASSIGN statements for the ten elements in
your array:

ASSIGN/V1[1]=2
ASSIGN/V1[2]=4
ASSIGN/V1[3]=6
ASSIGN/V1[4]=24
... and so on until ...
ASSIGN/V1[10]=76

In most cases, you must use the same variable name for all ASSIGN statements
for all dimensions. This tutorial uses the variable V1. The exception is for a Position
legacy dimension. For this dimension type, you can use V1[1], V1[2], and other
variables for the XYZ axis. However, for diameters of features and datums, and the
position callout, you should use unique variables, perhaps V2[1], V2[2], and V3[1]
respectively. Also be aware that the variable can only take number characters.
Alphabetic characters show only zeros in the report.

When you've finished adding in the ASSIGN statements, your measurement routine is
finished and ready to execute. The only thing left to do is modify your label templates to
read in the variable's array of values for each dimension.

Step 4: Modify Label Templates to Read Variables

In this step, you open each applicable label template and configure it so that it reads the
array of values for the variable.

1. Inside the Label Template Editor, with the exception of


BALLOON_PPAP_DIMENSION_TRUE_POSITION.LBL, open the other label
templates with the "BALLOON_" prefix given earlier.
2. Access the GridControlObject and access the contents of the first cell.
3. Modify the expression there to read as follows:

=INT(VARIABLE("V1["+N+"]",ID:N))

249
Reporting Measurement Results

4. Save each label template.


5. Finally, open BALLOON_PPAP_DIMENSION_TRUE_POSITION.LBL. Since this
template has more than one row in the GridControlObject, you need to specify
more than just the V1 variable.

• For the XYZ axis, you can use the V1 variable in your expression:

=INT(VARIABLE("V1["+N+"]",ID:N))

• For diameters of datums and features, you need it to use the unique
variable used earlier (such as V2):

=INT(VARIABLE("V2["+N+"]",ID:N))

• For the position callout, use another unique variable used earlier (such as
V3):

=INT(VARIABLE("V3["+N+"]",ID:N))

As the report increments through each dimension (using :N), the variable array is called
with "V1[" + N + "]" and the Nth element of the V1 array is displayed. You are now ready
for the final step of executing and viewing your results.

Step 5: Execute and View Results

In this final step, you define the report template to use in the Report window, execute
your measurement routine, and view your final results.

1. Save all your changes made to this point.


2. Access the Report window, and load the BALLOON_PPAP.RPT template.
3. Execute your measurement routine. You may also need to click the Redraw the
Report icon from the Reporting toolbar after execution.

250
Creating Forms

The Report window shows your final report. It should be similar to this, where the
numbered prints inside your PPAP report appear:

Final Report Showing Custom Numbered Items inside of a PPAP Report

Creating Forms
The Form Editor (File | Reporting | New | Form Report) lets you build interactive forms
and dialog boxes and activate them when a measurement routine gets executed. These
interactive forms use the Visual BASIC language. Forms, mixed with a good
understanding of the Visual BASIC language and PC-DMIS automation, can give power
and flexibility to your measurement routines.

Forms play an active part in reporting because whenever you use a form to control what
gets executed, you indirectly control what ends up in your report.

This section, however, does not attempt to cover everything that you can do with forms.
Instead, it covers how to use create and use forms in general, and in a reporting sense,
how to get information from the user and into a report using standard PC-DMIS
commands.

251
Reporting Measurement Results

Forms can also be used in a non-reporting role as a way to provide useful


instructions to operators. See "Providing Operator Instructions Using OLE Objects with
Forms" for some examples on how to do this.

Understanding the Form Editor


To create a new form in the Form Editor, select File | Reporting | New | Form Report.

To open an existing form in the Form Editor, select File | Reporting | Edit | Form
Report.

PC-DMIS displays the Form Editor in a new window.

Form Editor

The Form Editor acts as a work area. It enables you to drag, size, and place various
interactive form objects, such as buttons, list boxes, edit boxes, and so forth, and set
their properties.

Objects are placed on the gray and sizable area, called a form. If you have worked with
HyperView reporting in previous versions of PC-DMIS, you will feel at home with this

252
Creating Forms

editor since it essentially functions much the same way and contains many of the same
user interface elements.

With the new template approach to reporting, only the Form Editor can use the run-
mode capability. The Report and Label template editors do not use it.

Run Mode - This mode only works with the Form Editor. In run mode, you can run
(or execute) your form. This enables you to test how it would look or behave in an
actual measurement routine execution environment.

Edit Mode - This is the default mode for all the reporting editors. It is the only
mode for the Report and Label template editors.

To switch between run and edit modes, press CTRL+E.

The editor contains the following elements:

• The Menu bar


• The Font Bar (toolbar)
• The Object Bar (toolbar)
• The Layout Bar (toolbar)
• Object Property Sheets
• Object Sheet

Object Sheet
The Form Editor's Edit | Layout | Objects menu item displays the Object Sheet dialog
box.

Object Sheet dialog box

You can use this dialog box to set the tab order for objects and controls typically used
on dialog boxes by simply changing the order an object appears in this dialog box.

253
Reporting Measurement Results

When you press TAB in run mode, PC-DMIS will jump to the next object defined in this
dialog box, giving it the focus. Only some objects are affected by the TAB key. Pressing
TAB only works on those objects that have a number to the left of them in the Object
Sheet dialog box.

Tutorial - Creating Forms


This topic walks you through a basic tutorial that will create a simple form with some
interactive dialog box controls that, when executed, will allow you to select a user name
from a list and then choose to measure only certain features. The information you select
will then appear in a final report.

While you can certainly duplicate aspects of this by using certain Edit window
commands, this tutorial will give you an idea of what's possible with the Form Editor,
some imagination, and a little programming skill.

This tutorial uses files you created in the "Creating a Custom Report Template"
and "Creating Label Templates" tutorials. If you haven't already done so, complete
those tutorials first.

Step 1: Preparing the Work Environment

1. In this tutorial you will switch between the Form Editor and the Edit window, so
first prepare the Edit window.

• Right-click on your Edit window and select Docking View from the shortcut
menu to undock it.
• Select the maximize button so that it fills the screen.
• Place the Edit window into Command mode.

2. Select File | Reporting | New | Form Report to open the Form Editor.
3. To hide any unused toolbars, right-click on the toolbar area and remove them.
4. To hide any unused PC-DMIS windows, select the open window from the View
menu. Keep the Edit window open.
5. To maximize the Form Editor, click the maximize button in the upper right
corner of the editor's window. You should see the words "FORMS" on the
background of the editor. Your Form Editor should now look something like this:

254
Creating Forms

Form Editor

When working with the Form Editor, you may find it helpful to hide your usual
PC-DMIS toolbars and windows, thereby freeing up some screen space. If you work
frequently with this editor, you may want to create a stored screen layout for your
template. For information on layouts, see the "Window Layouts Toolbar" topic in the
"Using Toolbars" chapter.

Step 2: Create the Form

1. Drag the TheFrame/TheView's gray background so that it is 5 inches wide by 6


inches tall.
2. Add a Border object, and drag the border so that it fits just within the form's area.
Set the border's properties so that it has a LineWidth value of 3 and a
ForeColor of dark blue (0.0.128).
3. Add a Bitmap object in the top of the form. The Bitmap Dialog appears. Use the
Load button to navigate to a bitmap file of your choice, such as a corporate logo.
Size and position the bitmap so that it's within the top 1.5 inches of the form.

255
Reporting Measurement Results

4. Add a RadioButton object under the Bitmap object. Access the RadioButton's
properties, and click on the ListItems value. The List Choices dialog box
appears. This dialog box lets you create a list of option buttons for the object.
• Select the existing RadioButton1 item from the List Choices box. In the
Name box, change the name to "CIRCLE 1". The index Value should
already display 0.
• Click the Add button to add three more items. Then change the newly
added items to read "CIRCLE 2", "CIRCLE 3", and "CIRCLE 4". They
should have index values of 1, 2, and 3 respectively. The List Choices
dialog box, should look like this:

List Choices dialog box, showing four options with four index values
ranging from 0 to 3.

• Click OK when finished.


5. Rename the RadioButton object by changing the (ObjectCode) value from
"RadioButton1" to "optMeasure".
6. Add a Frame object and drag it around your RadioButton object. Change the
Frame's Text property to read "Select What to Measure".
7. Add an EditBox object to the right of the RadioButton object, and rename it from
"EditBox1" to "txtMeasure".
8. Add a Text object (Text1) under the RadioButton object, and set its Text property
to read "Select User:".
9. Add a ComboBox to the right of the Text object, and rename it from
"ComboBox1" to "cboUsers". This control will contain a list of users.
• Click on the ListItems value to add the list of users. This accesses the
List Choices dialog box again.
• Click Add. PC-DMIS inserts "(None)" under List Choices.

256
Creating Forms

• Change the name of the first item in the list from "(None)" to "[Select a
User]", and give it an index Value of 0.
• Continue to use this dialog box as you did before to add five or six user
names. This tutorial used "Bob", "Allen", "Mary", "Shelly", "Jared", and
"Kurt".
• Use the Up or Down buttons as desired to change where an item appears
in the list. The dialog box, when finished, should look something like this:

List Choices dialog box showing a list of user names for the ComboBox

• Click OK. Your ComboBox object now contains those list items.
10. Add an EditBox object to the right of the ComboBox, and rename it from
"EditBox2" to "txtUser".
11. Add another Text object (Text2) under the object that reads "Select User", and
set its Text property to read "Type a Report Description:".
12. Add another EditBox object to the right of the above Text object, and rename it
from "EditBox3" to "txtDescription".
13. Add a Button object to the bottom of the form, and rename it from "Button1" to
"cmdContinue". Change its Text property to read "&Continue". The ampersand
symbol lets you define whatever character follows it as a shortcut character to be
used with Alt. So, pressing Alt + C on your form in Run Mode will act as if you
clicked the Continue button.
14. Select File | Save to save the form. Give it the name "TestForm.Form" and save
it in a directory of your choice.
15. Press Ctrl + E to test your form in run mode. There's no code tied to any of the
controls so nothing much happens if you click on anything, but you'll add that
next. When finished, press Ctrl + E again to return to edit mode.

In this step, you have completed the basic form, adding various controls and assigning
items to lists. It should look something like this:

257
Reporting Measurement Results

Form with the various form controls added

Step 3: Add Code to the RadioButton Control

1. Select the RadioButton object, optMeasure, and access its properties.


2. Click on the EventChange event. The VBS Mini Editor appears. This small
code window lets you type Visual BASIC code statements that will run whenever
you select a new value from the list of option buttons.
3. In the code window, type this code:

Dim intIndex As Integer


intIndex=optMeasure.Index
Select Case intIndex
Case 0
txtMeasure.Text="Circle 1"
Case 1
txtMeasure.Text="Circle 2"
Case 2

258
Creating Forms

txtMeasure.Text="Circle 3"
Case 3
txtMeasure.Text="Circle 4"
End Select

4. Click OK. The mini editor closes.


5. Select File | Save to save the form.
6. Test your report by pressing Ctrl + E and entering run mode. Select a feature to
measure.

This code runs when you select a feature to measure from the list. It looks at what gets
selected from the list of option buttons, and sets the Text property of txtMeasure to
display a text string of "CIRCLE 1", "CIRCLE 2", and so on. Press Ctrl + E to exit run
mode and return to edit mode.

Step 4: Add Code to the ComboBox Control

1. Select the ComboBox object, cboUsers, and access its properties.


2. Click on the EventChange event. The VBS Mini Editor appears.
3. In this code window, type this code:

txtUser.Text=cboUsers.TextValue

4. Click OK. The mini editor closes.


5. Select File | Save to save the form.
6. Test your report by pressing Ctrl + E and entering run mode. Select a user.

This code runs when you select a user from the list. It looks at the text value of the
selected list item, and sets the Text property of txtUser to display a text string of the
selected user. Press Ctrl + E to exit run mode and return to edit mode.

Step 5: Add Code to the Continue button

1. Select the Button object, cmdContinue, and access its properties.


2. Click on the EventClick event. The VBS Mini Editor appears.
3. In this code window, type this code:

If cboUsers.Value>0 And Len(txtDescription.Text)>0 And


Len(txtMeasure.Text)>0 Then

259
Reporting Measurement Results

TheView.Cancel
Else
MsgBox "Please fill out the entire form before
continuing."
End If

4. Click OK. The mini editor closes.


5. Select File | Save to save the form.
6. Test your report by pressing Ctrl + E and entering run mode. Click the Continue
button.

This code runs when you click the Continue button. It checks to make sure the form is
all the way filled out, and if it is, it closes the Form Editor. If not, it displays a message
telling the user to fill out what's missing.

• The Len ( ) function tests the length (or the number of characters) for the text
string in the edit boxes, making sure something is there.
• The cboUsers.Value > 0 code checks to make sure a user name gets selected
from the list.

Step 6: Assign Edit Window Variables to Hold Form Properties

Now that you have defined your form, you need a way to pass data back and forth,
between the Edit window and the form.

1. If you haven't already done so, save your form.


2. From the Window menu select Edit Window to make the Edit window come to
the front.
3. Make sure it is in command mode.
4. After each Circle feature insert a Location dimension for that circle.
5. Near the top, before the Circle features, define variables that you will assign to
work with the form, by typing this code in the Edit window before the measured
Circle features:

ASSIGN/STR_DESCRIPTION=""
ASSIGN/STR_USER=""
ASSIGN/STR_MEASURE=""

260
Creating Forms

6. Place your cursor immediately after these statements, and select Insert | Report
Command | Form. An Insert Form dialog box appears. Navigate to where you
stored "TestForm.FORM", select it, and click Open.
7. PC-DMIS inserts a FORM/FILENAME command block into the Edit window with a
pathway to the selected form file. This command, when marked and executed,
will run the form. It then waits until the form is closed before continuing execution
of the Edit window.

Notice that this command contains a PARAM/= statement, or a


"parameter". These parameters let you pass values back and forth between the
PC-DMIS Edit window variable and the form control properties.

8. Click just before the left side of the equals sign in the PARAM/= statement, and
type "TXTDESCRIPTION.TEXT". Click on the right side of the equals sign, and
type "STR_DESCRIPTION". Press Enter. Another PARAM/= statement appears.

Remember that txtDescription is the name you gave the EditBox


object in your form that will hold a user-entered description of the report.

During execution, the Text property of txtDescription will initially take the value
of whatever STR_DESCRIPTION holds. In this case, it would take an empty
string. After you close the form, it passes whatever value the form has back into
STR_DESCRIPTION.

9. Continue to define parameters in this way for both the STR_USER and
STR_MEASURE variables, tying them to the txtUser and txtMeasure objects'
Text properties respectively.
10. Save your changes to the Edit window. When finished, your FORM/FILENAME
command block, should look something like this.

CS7 =FORM/FILENAME=D:\PARTPROGRAMS\TESTFORM.FORM
PARAM/TXTDESCRIPTION.TEXT=STR_DESCRIPTION
PARAM/TXTMEASURE.TEXT=STR_MEASURE

261
Reporting Measurement Results

PARAM/TXTUSER.TEXT=STR_USER
PARAM/=
ENDFORM/

Step 7: Add Edit Window Conditional Code to Control Measurement

When you created your form, you created a list of option buttons (using the RadioButton
object) to control what exactly gets measured. You now need to add conditional
statements into the Edit window too, so that the proper feature gets measured
according to what gets selected from the form.

1. In the Edit window, place your cursor right before the first CIR1 feature and press
Enter. Your cursor should be in a blank line above the CIR1 feature.
2. Select Insert | Flow Control Command | Control Pairs | If / End If. PC-DMIS
inserts an IF / END IF conditional statement into the Edit window:
IF/0
END_IF/

2. Define the condition. Highlight the default value of 0 and type:


STR_MEASURE=="Circle 1"
3. Press ENTER.
4. Select the entire CIR1 feature and the location dimension following it, and select
Edit | Cut. Then select Edit | Paste to move it onto a blank line after the
IF/STR_MEASURE == "Circle 1" line but before the END_IF/ line. Your first
conditional block should look like this:

IF/STR_MEASURE=="Circle 1"
CIR1 feature goes here...
Location dimension goes here...
END_IF/

262
Creating Forms

Remember that STR_MEASURE, after execution, will hold the value


of the txtMeasure object's Text property. According to the form code, this
will be either:

"Circle 1", "Circle 2", "Circle 3", or "Circle 4".

This first line checks the variable value of STR_MEASURE and if it matches
the string value of "Circle 1" then it will measure the CIR1 feature. If not, it
will skip and go to whatever follows the END_IF/ statement.

5. Continue repeating the above steps, defining conditional statements for the other
circle features as well. When finished, your Edit window code should look
something like this:

ASSIGN/STR_DESCRIPTION=""
ASSIGN/STR_USER=""
ASSIGN/STR_MEASURE=""
CS7 =FORM/FILENAME=D:\PARTPROGRAMS\TESTFORM.FORM
PARAM/TXTDESCRIPTION.TEXT=STR_DESCRIPTION
PARAM/TXTMEASURE.TEXT=STR_MEASURE
PARAM/TXTUSER.TEXT=STR_USER
PARAM/=
ENDFORM/
IF/STR_MEASURE=="Circle 1"
CIR1 =FEAT/CIRCLE...
DIM LOC1 LOCATION OF CIRCLE CIR1
END_IF/
IF/STR_MEASURE=="Circle 2"
CIR2 =FEAT/CIRCLE...
DIM LOC2 LOCATION OF CIRCLE CIR2
END_IF/
IF/STR_MEASURE=="Circle 3"
CIR3 =FEAT/CIRCLE...
DIM LOC3 LOCATION OF CIRCLE CIR3
END_IF/

263
Reporting Measurement Results

IF/STR_MEASURE=="Circle 4"
CIR4 =FEAT/CIRCLE...
DIM LOC4 LOCATION OF CIRCLE CIR4
END_IF/

Step 8: Add Finishing Touches

Now, you need to apply some finishing touches. First, you need to tell PC-DMIS to send
the values of our form to the final report in the Report window by using report
comments. Then you need to make some objects invisible on the form.

1. In the Edit window, type these commands immediately following the


FORM/FILENAME command block.

COMMENT/REPT,
"User: "+STR_USER
COMMENT/REPT,
"Report Description: "+STR_DESCRIPTION
COMMENT/REPT,
"Measure Routine: "+STR_MEASURE

2. Select Window | Form Editor to go back to the Form Editor.


3. Right-click to access the Properties dialog box. Select txtMeasure from the
drop-down list. PC-DMIS selects the object.
4. Click Advanced and set the Visible property to NO.
5. Select txtUser from the drop-down list. PC-DMIS selects the object.
6. Click Advanced and set the Visible property to NO. Since a user doesn't need to
see these values and the only reason we used them was to pass a value back to
PC-DMIS, setting this property to NO makes these objects invisible during
execution.
7. Save your form.
8. Close the Form editor.

Step 9: Execute the Measurement Routine

1. Select View | Report Window and use the Template Selection Dialog toolbar
icon to set the report to use the default standard report template, TextOnly.rtp.
2. Return to the Edit window. Mark the entire Edit window, save your measurement
routine, and then select File | Execute to test your measurement routine.
3. When PC-DMIS reaches the FORM/FILENAME command, it will run the form and
pause execution until you finish filling it out.
264
Creating Forms

4. Fill out the form and click the Continue button. PC-DMIS passes the values from
the form back into the PC-DMIS variables.
5. The conditional statements check the value of the STR_MEASURE variable and
execute the appropriate Circle feature accordingly.
6. PC-DMIS prints the report comments and the measured results for the measured
feature to the Report window.

Using Forms with Reports


Forms usually only modify reports indirectly. For example, you may have a form that
controls whether or not certain features get executed. In this case, the final report isn't

265
Reporting Measurement Results

modified directly, but indirectly because reports always show what gets executed
anyway.

You can however use the FORM/FILENAME command to pass parameters back and
forth between the Edit window and a form's objects, and use Comments to cause those
parameters to appear in a final report. See the "Creating Forms" tutorial and the
"Inserting a FORM Command" topic for examples of this type of forms use.

Additionally, after getting the values from a form into the Edit window, you can also use
the REPORT/TEMPLATE command to pass parameters from the Edit window into a
report template in the same way that you use the FORM/FILENAME command.

Select Insert | Report Command | Template Report to insert a REPORT/TEMPLATE


command, then assign parameter values to modify object properties in the report
template. See the "Creating Forms" tutorial on how to do this, using the
FORM/FILENAME command as a guide, but instead of selecting a .FORM filename,
select a Report Template (.rtp filename). Also, see the "Embedding HyperView Reports
or Report Templates in a Measurement Routine" topic.

Creating Custom Reports


Custom reports provide a flexible and easy-to-use approach to creating reports for your
measurement results. This is most useful when you need to generate a report quickly
and simply for a specific measurement routine, but you don't need the power available
to the template-based approach. Since custom reports do not use any report template,
and instead utilize your current measurement routine's data directly, custom reports are
generally easier to create and customize, but they lack the power and scope of template
reporting.

Advantages of Custom Reporting:

• You can place the data anywhere on the page and in any order.
• You can combine the data from multiple commands as a single element on the
report.
• You can generate the reports by unique drag-and-drop method.
• The report editor uses the actual data from the measurement routine, not the
dummy data. This makes customizing the report much simpler.

Disadvantages of Custom Reporting:

• You are creating a single report, not a template, and this report is tied to your
measurement routine. While you can import the structure of the report to use with

266
Creating Custom Reports

other measurement routines, the reusability is not as great as with report


templates designed with specific rules.
• It isn't as extensible as template reporting. Suppose you add a new feature or
dimension later to your measurement routine. For it to show up, you will need to
drag and drop the new item into your report editor.

The following topics provide you with a tutorial that walks you through how to create,
view, and print your first custom report. Procedural topics will also be provided for quick
access should you need them later.

About the Custom Report Editor


To access the Custom Report Editor, select File | Reporting | New | Custom Report.
To open an existing custom report for your current measurement routine, select File |
Reporting | Edit | Custom Report.

You can access a slimmed down version of this editor from the Report window's
Reporting toolbar. This lets you edit a report without leaving the usual PC-DMIS menu
structure. You can do this through either of these options:

Click Custom Report selection dialog ( ) and then click Blank Report and then
Open.

Click Edit report ( ).

PC-DMIS displays the Custom Report Editor with the Edit window placed into Summary
mode next to it.

267
Reporting Measurement Results

Custom Report Editor with the Summary mode to its left

This editor is similar to the Report Template Editor, Label Template Editor, and Form
Editor. With the exception of some differences in its Object Bar, the user interface is
essentially the same.

The custom report is the white and sizable area on top of the "CUSTOM" background.
Note that when you use this editor, you do not create a template, but create the actual
report that appears in the Report window. When you create a new custom report, this
editor opens side by side with the Edit window set in Summary mode. This allows you to
drag the desired objects from Summary mode onto your Custom Report. See "Creating
Custom Reports".

With the Custom Report Editor, you cannot place the Report or Label template editors
into run mode as you did with the HyperView editor. The Custom Report Editor only
opens in edit mode and cannot be switched to run mode. Run mode functions only with
the HyperView editor or the Form Editor.

The editor contains the following elements:

• The Menu bar


• The Font Bar (toolbar)
• The Object Bar (toolbar)
• The Layout Bar (toolbar)
• Object Property Sheets

268
Creating Custom Reports

Tutorial - Creating a Custom Report


This topic walks you through a very basic tutorial that will result in you creating a simple
custom report. This should give you a basic overview of how custom reports are created
within the Custom Report Editor and how they interact with existing label templates so
you can later create and use your own custom reports.

Before you begin this tutorial, create a simple measurement routine that has four
measured circles on a simple part and four Circularity dimensions, one for each circle.
This tutorial uses the Hexagon test block (Hexblock_Wireframe_Surface.igs).

Create a measurement routine that measures four circles, similar to this.

Step 1: Setting Up the Work Environment

In this tutorial you will use the Edit window in Summary mode along with the Custom
Reporting Editor.

1. Select File | Reporting | New | Custom Report from the menu bar to show both
the Custom Report Editor and Summary mode next to it.

You can also create a new report from the Custom Report Selection

dialog icon ( ) on the Report window's Reporting toolbar. From the dialog
box that appears, click Blank Report and then Open to create the blank report.

2. To hide any unused toolbars, right-click on the toolbar area and remove them.
3. To hide any unused PC-DMIS windows, select the open window from the View
menu. Keep the Edit window open.

269
Reporting Measurement Results

4. To maximize the Custom Report Editor, click the maximize button in the
upper right corner of the editor's window. You should see the words "CUSTOM"
on the background of the editor.
5. Drag the Edit window underneath the Custom Report Editor's Object Bar. Your
work environment should now look something like this:

When working with the Custom Report Editor, you may find it helpful to hide your
usual PC-DMIS toolbars and windows, thereby freeing up some screen space. If you
work frequently with this editor, you may want to create a stored screen layout for it. For
information on layouts, see the "Window Layouts Toolbar" topic in the "Using Toolbars"
chapter.

Step 2: Dragging, Dropping, and Positioning Objects

In this step, you will drag the report items into the Custom Report Editor.

1. From the Edit window in Summary mode, select File Header, and drag it out
onto the editor. You will notice a transparent image of that item's icon as you
drag it out onto the work area.
2. Release the mouse button. PC-DMIS creates a File Header object in the editor.

270
Creating Custom Reports

3. Drag and drop CIR1 and CIR2 onto your report. Don't worry about positioning
them properly. For now, just drop them into any empty space on the first page of
the report.
4. In the Report Editor, select the File Header object already in your report, and
drag it to a place near the top of the report and center it horizontally on the page.
5. Next, select the label object for CIR1, and drag it so that the top edge is just
under the bottom edge of the File Header object. Try to align their left sides as
well.
6. Repeat this step for CIR2.
7. Now, drag the CIR3 feature from the Edit window to the bottom of the label used
for CIR2. Notice that as you move your mouse over the various labels already in
the editor, green handles appear around the labels. When the blue arrow
appears just below CIR2, release the mouse. The feature is dropped into the
editor below CIR2, and the label object for it becomes automatically aligned with
the object above it.
8. Repeat the above step for CIR4, attaching it just below CIR3.
9. Select File | Save. A dialog box will appear, which allows you to save your
report. Choose any name and click Save.

Your Custom Report Editor should look something like this:

Step 3: Using Multiple Pages

In this step, you will work with multiple pages. You will add two additional pages and
modify one page to support a different page size. Then you will rearrange the pages.

271
Reporting Measurement Results

1. In the Report Editor, at the bottom of the page, right-click on the Page1 tab and
select Add Tab. A new page appears, called Page2.
2. Right-click on that page. The Properties dialog box appears.
3. Change Height to 850, and press the Tab key.
4. Change Width to 1100, and press the Tab key. Changing these two properties
essentially formats the page for Landscape printing.
5. Create a third page, Page3.
6. Right-click on Page2, and click Move Right. Notice how this moves the Page2
tab to the right of Page3.
7. Right-click on Page3, and click Move Left. Your pages are now reordered to
show Page3, followed by Page1, followed by Page2. In this way, you can
rearrange your pages.
8. Save your report.

Your report now has three pages, and their order has been changed.

Step 4: Dropping onto Other Objects

This step demonstrates how you can replace existing label objects with new label
objects and how to use the CADReportObject inside a custom report.

1. In the Custom Report Editor, select the Page1 tab. To replace any object in your
report, drag and drop any other item of a similar type on top of it. For example,
you can drop any item that uses labels on top of any existing label in your editor.
2. Select the label in your report for the CIR1 feature. You should already have four
Circularity dimensions. If not, create them now, one for each circle feature.
3. Drag the Circularity dimension for the CIR1 feature from your Edit window and
drop it on top of the feature label already in your report editor for CIR1, like this:

272
Creating Custom Reports

Notice that the label object is updated with a new label object.
4. If the updated object moved, reposition it.
5. Drag the other dimensions on top of their respective feature labels in the editor.
PC-DMIS updates all the labels accordingly, so that they look something like this:

Report Editor Now Showing the Four Dimension Labels

6. Now, click on the Page2 tab. Drag a CADReportObject from the Object Bar
onto that page, and size it so it fills the page.
7. Drag the four dimensions one at a time on top of the CADReportObject. For this
object, notice PC-DMIS does not replace it with a label object for the dimension.
Instead, PC-DMIS automatically creates the appropriate labels and leader-lines
on top of the CADReportObject for the dimensions.
8. Save your report.

Page1 now has dimension labels instead of feature labels, and the CADReportObject
in Page2 should look something like this:

273
Reporting Measurement Results

Step 5: Inserting Data Items

In this step you will insert a GridControlObject and get it ready to display values from
the Edit window. You will then drag the measured and nominal values from a feature's
data items into the available cells of the object.

1. Click on the Page3 tab.


2. Click on the GridControlObject icon, and drag the object onto the page.
3. Access the Properties dialog box, and set NumRows to 8 and NumCols to 3.
4. In the first row, the middle cell, double-click, and then type "Nominal". In the right
cell, do the same, and type "Measured".
5. Starting with the first row, and first column, and then moving down through the
other rows, type "X", "Y", "Z", "I","J" ,"K", and "Diameter". This fills in rows 2
through 8 in column 1. Your GridControlObject should look like this:

274
Creating Custom Reports

A GridControlObject with Static Text

Remember when typing information into a cell, you must click in another
cell or press the Tab key for the value to actually be displayed.

6. In the Edit window, click the plus sign next to CIR1, and then click the plus sign
next to Theoreticals. You will see a list of data items.

Data Items in the Theoreticals List

7. Drag the Theoretical X data item, and drop it into the Row 2, Column 2.

275
Reporting Measurement Results

Dragging the item

Dropping the Item

8. Double-click on the item you just dropped into the cell. You will see that cell is not
really holding static text. Under the hood, the cell actually holds the expression
needed to display the data. This means the information is not hard coded, and if
it changes, your report will be changed as well to match.

276
Creating Custom Reports

Looking at the Data Item's Expression

9. Continue to drag and drop the remaining data items from the Theoreticals list
into the appropriate cells in the Nominal column.
10. In the Edit window, expand the Actuals list for CIR1, and drop the data items into
the appropriate cells of the Measured column.
11. Expand the Settings list for CIR1, and drag and drop the ID data item into the
cell at row 1, column 1.
12. Finally, apply some text and background formatting of your choice to row 1 and
column 1, and then save your report. The GridControlObject should look similar
to this:

A Sample GridControlObject containing Data Items

13. Select File | Close to close the Custom Report Editor.

Your values may differ based on the part and circles measured.

This step demonstrated how to drag and drop data items into a GridControlObject.

277
Reporting Measurement Results

Data items don't have to be dropped only onto a GridControlObject; you can
also drop them onto the editor's page directly.

Step 6: Viewing, Updating, and Printing your Report

This final step explains how to load your custom report into the Report window, how to
view it, how to update a report from a measurement routine that changes, and finally
how to print it.

1. Select View | Report Window to access the Report window.


2. From the Report window's Reporting toolbar, select Custom Report Selection
Dialog . A dialog box appears and shows all custom reports.
3. Select your report and click Open. Your report appears in the Report window.
4. Next, you will update your report. Select File | Reporting | Edit | Custom
Report. A dialog box appears and shows all the reports you've created for your
current measurement routine.
5. Select your report and click Open. Your report opens inside the Custom Report
Editor.
6. Go ahead and make any change to your report in the editor, and then save your
report again.
7. To get the newly-updated report to appear in the Report window, re-execute your
measurement routine, or click the Redraw icon from the Reporting toolbar.
8. Finally, you need to print your report. Select the File | Printing | Report Window
Print Setup menu item. The Output Configuration dialog box appears.
9. Select the Report tab. In the Output Options section, mark the Printer check
box to send the report to your printing device.
10. From the Report window's Reporting toolbar, click the Print icon. PC-DMIS
prints your report.

In this step, you've loaded an existing report into the Report window, updated it, and
then sent it to your printer.

Congratulations! You've successfully completed the Creating a Custom Report tutorial.

Custom Report Generation


To create a new custom report, follow these steps:

278
Creating Custom Reports

1. Select File | Reporting | New | Custom Report to open the Custom Report
Editor and show the Edit window in Summary mode.

2. Drag items from the Edit window and drop them into the editor.

PC-DMIS automatically uses the labels defined by the current Page


object's rule set to display the objects. If you drop an object and it doesn't have an
associated label, an Open dialog box appears so that you can choose a label
defined for the dropped item.

3. Add and configure additional objects from the editor's Object Bar as needed.
4. Position report elements as desired.
5. Select File | Save to save your report. A dialog box opens to allow you to specify
the name of your report.

Another way you can create a new custom report is to use the Reporting
toolbar. (For information on the Reporting toolbar, see "Reporting Toolbar".)

1. From Report window's Reporting toolbar, click the Custom Report

Selection dialog button ( ).


2. Double-click on Blank Report to create a new blank custom report.
3. Edit the report as usual.

4. Click the Edit report button ( ) to close edit mode and follow the
prompt to save your report.

Positioning Report Objects


Inside the Custom Report Editor ( File | Reporting | New | Custom Report ), you can
position objects by dragging objects where you want them or by using the appropriate
alignment icons from the editor's Layout Bar.

In addition, PC-DMIS provides a useful tool to essentially snap an object below an


object above it. To do this, slowly drag an object so that its top and left edges are more
or less aligned with another object's bottom and left edges. Your mouse pointer will
change to include a small blue arrow: This arrow indicates that the object's left side you
are positioning will be aligned with the object's left side above it.

279
Reporting Measurement Results

Aligning Objects Using the Blue Arrow

When this arrow appears, you can release you mouse button, and the object you are
dragging will align itself to the other object:

Objects Are Aligned

The blue arrow can also help with dropping an object precisely under another object.
Simply drag the object over an existing object until green handles appear around the
existing object, then drag the mouse slightly under that object until the blue arrow
appears. Release the mouse when it appears, and the dropped object will appear
aligned to the other object.

This allows you to create a list of objects without white space in between, useful when
aligning a list of labels containing your feature or dimension data.

280
Creating Custom Reports

Dragging and Dropping Information into a Custom


Report
As the "Custom Report Generation" topic describes, you can drag features and other
items from the Edit window in Summary mode into the Custom Report Editor (File |
Reporting | New | Custom Report).

Example of dragging a File Header object onto the editing area (the Page object)

When you drop an item into the editor, the appropriate label for that feature, as defined
by the Page object's Rule Tree Editor, automatically gets created:

Example of a dropped File Header object

Replacing Information by Dropping on Top of Existing Labels

If you drag an item on top of an existing label, like this:

281
Reporting Measurement Results

Example of dropping a Dimension on top of an existing label

PC-DMIS replaces the existing label with the dropped item:

Example of the updated label

Dropping a Floating Label by using the Alt Key

If you drag an item on top of an existing label while you press the Alt key, like this:

282
Creating Custom Reports

Example of Dragging on top of a Large Page-Size Label

PC-DMIS does NOT replace the information in the label with what you dropped.
Instead, it floats the new label on top of the existing label.

Example of dropping onto a large page-size label with Alt key pressed

283
Reporting Measurement Results

You may find this useful if you have a large custom label that covers much of the page,
and you want to place new labels on top of that label instead of updating it.

Dropping Feature or Dimension Data on a CADReportObject

If you drag a feature or dimension on top of a CADReportObject (CRO), like this:

Example of dropping a Dimension on top of a CRO

PC-DMIS adds the appropriate label object and leader-line for the dropped object on top
of the CRO. The label that PC-DMIS shows depends on the label specified in the CRO's
Rule Tree Editor and not the Rule Tree Editor for the Page object.

284
Creating Custom Reports

Example of a dropped dimension on top of a CRO

Dropping Colormaps on a CADReportObject

If you drag a colormap on top of a CadReportObject (CRO), like this:

Example of dropping a surface colormap onto a CRO

PC-DMIS displays the colormap on the CRO:

285
Reporting Measurement Results

Example of dropping a surface colormap onto a CRO

For more information on using colormaps with the CRO, see "Colormaps and the
CadReportObject".

Dropping Data on an Analysis Object

If you drag a dimension on top of a Analysis object, like this:

Example of dropping a Dimension on top of an Analysis object

PC-DMIS displays the graphical analysis information for the dropped dimension inside
the Analysis object.

286
Creating Custom Reports

Example of a dropped Dimension on top of an Analysis object

Dropping Data on a DimensionHistogram Object

If you drag a dimension on top of a DimensionHistogram object, like this:

Example of dropping a Dimension on top of a DimensionHistogram object

PC-DMIS displays the histogram information for the dropped dimension inside the
DimensionHistogram object.

287
Reporting Measurement Results

Example of a dropped Dimension on top of a DimensionHistogram object

Invalid Drop Areas

If you try to drop an item on top of an invalid object (for example if you drag a feature or
dimension on top of a Text object), PC-DMIS changes your pointer to display a red "not
allowed" symbol to show you that you cannot drop that item there.

Example of an invalid drop area for a dragged dimension

Using Shift and Ctrl Keys When Dropping

While you perform the drop of a command (such as a feature or dimension), if you hold
down the Shift or Ctrl key and release the button, PC-DMIS does the following:

• Shift key - PC-DMIS inserts a CommandTextObject for that item. This lets you
display the information for that item in a textual, non-table format.
• Ctrl key - PC-DMIS displays an Open dialog box, which enables you to select a
different label template for the item.

When performing a drop of a data item, if you hold down the Ctrl key, PC-DMIS displays
the evaluated expression for the data item as well as the descriptive string of text from
the Summary mode that precedes it.

Dropping Multiple Items

You can drag multiple items at once from the Edit window in Summary mode. This is
useful if you want to quickly add several items into your report.

288
Creating Custom Reports

• To select an entire list of consecutive items, click the first item, press Shift on the
keyboard, and click the last item. All items between them are selected.
• To select or deselect individual items to or from your existing selection, press and
hold the Ctrl key while you click on items.

Once you have selected a list of items, drag them into the editor.

Using Rules
Like template reports, custom reports use the Rule Tree Editor to determine what label
templates should be used in your report. A default set of rules is automatically included,
so you only need to change the default rules if you want to load some sort of custom
label template.

To work with these rules,

1. Right-click on the editing area (the Page object) in the Custom Report
Editor (File | Reporting | New | Custom Report).
2. Select Properties from the small popup menu. The Properties dialog box
appears.
3. Click on Rule... in the Rule Tree Editor property. The Rule Tree Editor appears
4. Modify the rules as desired.

For information on accessing and using the Rule Tree Editor, see "About the Rule Tree
Editor".

Working with Multiple Pages


When you create a new custom report using the Custom Report Editor (File
|Reporting |New |Custom Report), the editing area is blank. No objects exist in the
editing area except for the editing area itself. The editing area is actually a Page object,
and its properties can be modified as with any other object. Simply right-click on the
object and select Properties.

Similar to Section tabs in the Report Template Editor, you can create multiple Page
tabs (Page objects) in the Custom Report Editor. To do this, right-click on the tab and
select Add Tab from the popup menu. An additional tab appears at the bottom of the
editing area:

289
Reporting Measurement Results

Example of Multiple Page tabs

This will create additional reporting pages that will later appear in the Report window.
While similar to Section tabs, Page tabs reflect a single additional page in your final
report, whereas a single Section tab may actually end up displaying multiple pages in
the final report depending on any defined rules for objects in that section and the length
of your measurement routine.

You can size your Page objects to meet different needs. For example, you can modify
one page's properties to display its contents in a standard Portrait format and another
page's properties to display its information in a Landscape format or to match printer or
page settings for a specific locale.

You can easily reorder pages as well. To do this, right-click on a Page tab, and select
either Move Right or Move Left. The tabs at the bottom of the Editing area will be
reordered accordingly.

From the Report window's preview pane, you can also create and reorder
pages. From that pane, you can drag and drop objects to move them from one page to
another. For more information, see "Working with the Preview Pane".

Viewing and Printing Custom Reports


Custom reports are viewed and printed using the Report window.

To view your report,

1. Access the Report window (select View | Report Window).


2. From the Report window toolbar, select the Custom Report Selection Dialog
icon . A dialog box appears showing all custom reports.
3. Select your report and click Open. Your report appears in the Report window.

290
Creating Custom Reports

To print your report,

1. Define your output using the File | Printing | Report Window Print Setup menu
item.
2. Either execute your measurement routine, or click the Print icon from the
Reporting toolbar.

Editing or Deleting Custom Reports


Custom reports are not stored as a typical file. Instead, they are stored as part of the
measurement routine.

Editing a Custom Report

1. In PC-DMIS, select View | Report Window to select the Report window.


2. From the Report window, click on the Custom Report Selection Dialog icon

( ).
3. Select the report to edit.

4. From the Reporting toolbar, click Edit report ( ) to place the report in edit
mode. When the report is in edit mode, PC-DMIS shows the Edit window in
Summary mode. PC-DMIS also enables or shows the following reporting tools:

• The Save ( ) and Save As ( ) buttons on the Reporting toolbar


• The Font bar
• The Layout bar
• The Object bar
• The View | Report Controls submenu
5. Use the Edit window and the above reporting tools to edit the report.

6. Click Save ( ) or Save As ( ) to save your changes.

7. Click Edit ( ) again to leave edit mode and restore PC-DMIS to its previous
state.

Alternately, you can also edit your custom report through the older File | Reporting |
Edit | Custom Report menu item.

291
Reporting Measurement Results

Deleting a Custom Report

Because custom reports are stored in the measurement routine, you have to delete
them within PC-DMIS, not through Windows Explorer.

1. In PC-DMIS, select View | Report Window to select the Report window.


2. Make sure the report is not in edit mode.
3. From the Report Window, click on the Custom Report Selection Dialog icon

( ).
4. Select the report to delete.
5. Press Delete on your keyboard.

Using a Custom Report from another Measurement


Routine
You can use a Custom Report from another measurement routine in your current
measurement routine to a certain extent.

To do this,

1. Select the File | Reporting | Edit | Custom Report from Other Measurement
Routine menu item. An Open dialog box appears showing all your measurement
routines.
2. Select your measurement routine and click Open. A Custom Report dialog box
appears. If a report exists for the selected measurement routine, it will show up in
this dialog box.
3. From the dialog box, select the report you want to use and click Open. PC-DMIS
loads the report in the Custom Report Editor.

If a feature or item is not found in the measurement routine, the label or object will be
blank.

About Report Expressions


Report Expressions are special commands that you place inside of report and label
template objects to pull specific data from PC-DMIS and place them into those objects.
For example, suppose that you want to insert a feature ID into a label template. You
would add an object that supports expressions into your report, such as the

292
About Report Expressions

GridControlObject. Then, inside of an Expression Cell of the grid, you would type
"=ID".

There are four areas where you can insert report expressions:

• The Rules Tree Editor - in the Conditional Expression and Text Expression
boxes
• The GridControlObject - in its grid cells
• The GridControlObject - in the Repeat Expression box in the Row tab for repeat
expressions
• Property Sheet Values - on edit fields or combo boxes that take text values

Consult those topics for information on where to insert report expression code.

For available expressions, consult "Functions and Operators" and "Using Data Types to
Find a Report Expression" for lists of available functions, operators, and data types.

Reporting expressions can also use many normal PC-DMIS expressions.


Precede the expressions with the "=" sign when you type them in the cell. Expressions
are discussed in the "Using Expressions and Variables" chapter.

Functions and Operators


The following are lists of functions and operators available to the Reporting expression
language. These work the same as the PC-DMIS expression language.

The Reporting expression language does not support variables, structures, or functions
like the PC-DMIS expression language does. In place of variables, a new type called
DATA_TYPE has been added to the language. See "Using Data Types to Find a Report
Expression" for more information. Another new difference in the Reporting language is
the addition of a set of constants described in "Predefined Constants".

293
Reporting Measurement Results

Remember to precede your expression with an equals sign (=). Also, make
sure that the command from which you are getting your data supports the expression
you want to use.

() Parentheses are used to group expressions and determine evaluation order.

Functions for Report Expressions


Items preceded with an asterisk symbol (*) are unique to the reporting expression
language.

ABS(<expression>)
This function returns the absolute value of the input value.

ACOS(<expression>)
This function returns the arc-cosine for the input value. Input and result are in
radians.

ANGLEBETWEEN(<expression1>, <expression2>)
This function returns the angle between the two inputs expression1 and
expression2, which should be of type vector. Result is in degrees.

ARRAY(<expression1>,<expression2>, & <expressionN>)


This function creates an array out of the input values.

ASIN(<expression>)
This function returns the arc-sine for the input value. Input and result are in
radians.

ATAN(<expression>)
This function returns the arc-tangent for the input value. Input and result are in
radians.

AVERAGE(<expression>)
Same as in PC-DMIS expression language.

COMMANDDATA(<expression1>,<expression2>)
This expression calculates or displays information from the feature referenced by
the command object from the Report Data event. This takes a single required
parameter for expression1. This parameter tells PC-DMIS what feature

294
About Report Expressions

information to display. A second optional parameter, expression2, is provided for


future support but currently isn't used.

You can pass string values through expression1:

• "RMS" - This stands for Root Mean Square. It calculates the Root Mean
Square value of the feature.
• "T" - This returns the T value of the feature (it is the same as the T axis on
a dimension).

You can also pass expressions, like the ISOUTTOL() function, through
expression1:

In this example, taken from the TEXTANDCAD_OOT.RTP report


template, the expression checks to see if the out-of-tolerance value is
greater than zero:

IF "COMMANDDATA("=ISOUTTOL()","")>0" Then Use


Template "Reference_ID.lbl"

If so, it uses the Reference_ID.lbl label template. For more information


on ISOUTTOL, see the ISOUTTOL expression description below.

CHR(<expression>)
This function returns the ASCII character value for the corresponding input value,
which should be of type integer.

*COLOR(<expression1>, <expression2>)
This function makes the text value of expression1 use one of the four colors as
currently defined in the color tree. 1 = Marked Color, 2 = Unmarked Color, 3 =
Step Mode, and Color 4 = Error Color. See "Changing a String's Text Color".

*GetTolColor(expression1, expression2, expression3)


This function takes three expressions: deviation, plus tolerance, and minus
tolerance. It returns the current tolerance color as type COLORREF based on the
deviation.

295
Reporting Measurement Results

expression1 is the deviation as a double value, expression2 is the plus tolerance


as a double value, and expression3 is the minus deviation as a double value.

You can use this returned color with the color properties of objects in reporting,
such as ForeColor and BackColor, to dynamically change the color of the object
to reflect the current tolerance value.

These colors are specified in the Edit Dimension Colors dialog box. See "Editing
Dimension Colors" in the "Editing the CAD Display" chapter.

CONCAT(<expression1>, <expression2>, & <expressionN>)


This function concatenates all of the strings specified in expressions 1 through N
together into one string.

COS(<expression>)
This function returns the cosine for the input value. Input and result are in radians.

*COUNT(expression1)
This function returns the number of instances of the data type specified in
expression1 for the current command.

CROSS(<expression1>, <expression2>)
This function returns the cross product of expession1 and expression2, both of
which should be of type vector.

*DATAFIELD(<expression1>, <expression2>, <expression3>)


This function is used only within the Custom Report Editor. This function returns
information from a specific data field within a feature, dimension, or command.
This function takes three parameters: expression1 is a string representing the
unique id or id of the command, expression2 is a string representing the data type,
and expression3 is the typeindex. Normally, the typeindex is 0, but in cases where
a dtype occurs more than once, it will be 1 or greater.

This expression is automatically created and used when you drag and drop items
from the Edit window into your custom report.

DATEVALUE()
Same as in PC-DMIS expression language.

DEG2RAD(<expression>)
This function converts the input from degrees to radians.

DELTA(<expression1>, <expression2>, <expression3>)


This function generates a new point moved along the vector specified in
expression2 by the distance specified in expression3 from the point specified in
expression1.

296
About Report Expressions

DISTANCEFROMEDGE()
This function retrieves the distance of the measured centroid of the command's
underlying feature from the closest edge on the CAD.

• If the underlying command is a feature, this function uses the measured


feature to return the distance.
• If the underlying command is a dimension, this function uses the first
feature in the dimension to return the distance.

You can use this function in the Rule Tree Editor to specify different label
templates based on the distances returned.

DOT(<expression1>, <expression2>)
This function returns the dot product of expression1 and expression2. The input
values should be of type point.

DOUBLE(<expression>)
This function converts the input value from its current type to a double. In the case
of a point, the function returns the distance of the point from the origin.

*ELAPSEDTIME()
This function returns the amount of time taken for execution.

ELEMENT(<expression1>, <expression2>, <expression3>)


Same as in PC-DMIS expression language.

EQUAL(<expression1>, <expression2>)
This function tests whether two arrays are identical and returns 1 if they are
identical; otherwise, it returns 0.

<expression1> ^ <expression2>
Same as in PC-DMIS expression language.

EXPON(<expression>)
Same as in PC-DMIS expression language.

*FILENAME()
This function returns the full path and file name of the measurement routine.

FORMAT(<expression1>, <expression2>)
Same as in PC-DMIS expression language.

*GETCOUNT(expression1)
This function returns a long value of the number of instances that exist for the
ENUM_FIELD_TYPES data type, specified in expression1. For example, a

297
Reporting Measurement Results

location dimension that reports in X,Y,Z, and D would return 4 for the Axis data
type.

GETFEATURESSETID(<expression1>)
During execution, if the current command is a dimension, this function checks to
see if the reference feature for this dimension is in a feature set. If it finds the
reference feature in a set, it returns that set's ID as a string value with a ".lbl"
extension appended to the end it. If it does not find a feature set command with
the reference feature, it returns the default string value supplied in <expression1>.
This default value should be a label file name that includes the .lbl extension.

For example, suppose you have the following Location dimension that
references a circle named CIR1:

DIM LOC1= LOCATION OF CIRCLE CIR1 UNITS=IN ,$


GRAPH=OFF TEXT=OFF MULT=10.00 OUTPUT=BOTH
...
END OF DIMENSION LOC1

You can use the GetFeatureSetID function inside a rule to automatically


determine the label that PC-DMIS displays for this dimension depending on
whether or not CIR1 exists inside of a feature set.

For example, this rule automatically uses the LEGACY_DIMENSION.LBL


label if it cannot find a FEAT/SET command that contains CIR1:

USE TEMPLATE "=GetFeatureSetID("LEGACY_DIMENSION.LBL")"

If there is a FEAT/SET command, you can then change the ID for that
command to match the desired label name you want to use (or change a
label file name to match the ID). PC-DMIS then uses that label instead.

In this code here, notice that the FEAT/SET references CIR1. It also has its
usual label identification changed to "REFERENCE_ID" and the
GetFeatureSetID function returns "REFERENCE_ID.LBL":

REFERENCE_ID=FEAT/SET,CARTESIAN
THEO/<0,0,0>,<0,0,1>
ACTL/<0,0,0>,<0,0,1>
CONSTR/SET,BASIC,CIR1,,

298
About Report Expressions

GETTEMP(<expression1>)
This function returns the specified temperature or threshold value. One of these
string values used for expression1 determines what this function returns:

• "TEMPP" - Returns the part temperature


• "TEMPX" - Returns the X axis temperature
• "TEMPY" - Returns the Y axis temperature
• "TEMPZ" - Returns the Z axis temperature
• "REF_TEMP" - Returns the temperature compensation reference
temperature
• "HIGH_THRESHOLD" - Returns the temperature compensation high
threshold
• "LOW_THRESHOLD" - Returns the temperature compensation low
threshold

GETPROGRAMINFO(<string>,<optional string>)
Same as in PC-DMIS expression language.

IF(<expression1>, <expression2>, <expression3>)


If expression1 evaluates to a non-zero value, the function returns the value of
expression2; otherwise, the function returns the value of expression3.

INDEX(<expression1>, <expression2>)
Same as in PC-DMIS expression language.

INTEGER(<expression>)
Same as in PC-DMIS expression language.

ISMARKEDFORARM(<expression>)
Use this function in Multiple Arm mode contexts. This function returns 1 if the
command is marked for the arm specified in <expression>; otherwise, it returns 0.
This function lets you control what is displayed in the report based on the
command's executing arm.

=IsMarkedForArm(1)

would return 1 if the current command is marked for arm 1, otherwise it


returns 0.

=IsMarkedForArm(2)

would return 1 if the current command is marked for arm 2, otherwise it


returns 0.

299
Reporting Measurement Results

=IsMarkedForArm(1) AND IsMarkedForArm(2)

would return 1 if the current command is marked for both arms, otherwise it
returns 0.

*ISOUTTOL()
This function checks if a command is out of tolerance. This is only used with the
COMMANDATA expression as discussed above.

LEFT(<expression1>, <expression2>)
Same as in PC-DMIS expression language.

LEN(<expression>)
For a string, this function returns the number of characters in the string. For an
array, it returns the number of elements in the array.

LN(<expression>)
Same as in PC-DMIS expression language.

*LOADSTR(<expression>)
This function loads the string using the numerical value from the resource files. A
negative numerical value causes the string to be loaded from the string's
resources. See "Loading Strings from PC-DMIS" for more information.

LOG(<expression>)
Same as in PC-DMIS expression language.

LOWERCASE(<expression>)
Same as in PC-DMIS expression language.

<expression1> < <expression2>


Same as in PC-DMIS expression language.

MAX(<expression>)
Same as in PC-DMIS expression language.

MAXINDEX( <expression>)
Same as in PC-DMIS expression language.

MAXINDICES( <expression>)
Same as in PC-DMIS expression language.

*MEASSCALE()
This function returns the re-scale factor used when measuring.

300
About Report Expressions

MIN(<expression>)
Same as in PC-DMIS expression language.

MININDEX(<expression>)
Same as in PC-DMIS expression language.

MININDICES(<expression>)
Same as in PC-DMIS expression language.

MID(<expression1>, <expression2>, <expression3>)


Same as in PC-DMIS expression language.

MPOINT(<expression1>, <expression2>, <expression3>)


Same as in PC-DMIS expression language.

*NUMMEAS()
This function displays a number value that represents the number of dimensions
reported.

*NUMOUTTOL()
This function displays the number of reported out-of-tolerance dimensions.

ORD(<expression>)
Same as in PC-DMIS expression language.

PCDMISUSERHIDDENDATAPATH()
Same as in PC-DMIS expression language.

PCDMISUSERVISIBLEDATAPATH()
Same as in PC-DMIS expression language.

PCDMISSYSTEMHIDDENDATAPATH()
Same as in PC-DMIS expression language.

PCDMISSYSTEMVISIBLEDATAPATH()
Same as in PC-DMIS expression language.

PCDMISSYSTEMREPORTINGPATH()
Same as in PC-DMIS expression language.

PCDMISAPPLICATIONPATH()
Same as in PC-DMIS expression language.

*PARTNAME()
This function displays the part name (the same as what is shown in the file
header).

301
Reporting Measurement Results

*PAGE()
This function displays the current page number.

*PAGES()
This function displays the total number of pages.

PAGEDIMCOUNT("ObjectID",Range)
This function takes two parameters. If the first parameter is empty (nothing inside
the quote marks), then this function returns the number of dimensions in the
current page with a max deviation less than Range*Tol. The second parameter,
Range, is a floating number. If the first parameter references a CadReportObject
ID or a TextReportObject ID, then this returns the number of in-tolerance
dimensions associated with the specified CadReportObject or TextReportObject.

For example, suppose you want to return the number of out of


tolerance dimensions with CadReportObject1. You could use the following
code to do this:

=TotalPageDimCount("CadReportObject1") -
PageDimCount("CadReportObject1",1.0)

You can also calculate the number of dimensions that contain a specific number of
axes. To do this, append ":N" to the ID, where N is a number that represents the
number of axes.

For example, typing


=PageDimCount("CadReportObject1:4",1.0) returns the number of
dimensions associated with CadReportObject1 that contains at least four
axes and that had the fourth axis within the specified tolerance of 1.0. If you
do not specify the number of axes, it returns the number of dimensions
associated with CadReportObject1 if all axes were within the specified
tolerance of 1.0.

For Custom Reports, you can only use this function with a CADReportObject,
because a TextReportObject cannot go on a Custom Report.

RAD2DEG(<expression>)
Same as in PC-DMIS expression language.

302
About Report Expressions

REAL(<expression>)
Same as in PC-DMIS expression language.

*REGSETTING(<expression1>, <expression2>)
This function displays a value of a specific registry entry. This function takes two
parameters: expression1 determines the section, and expression2 determines the
registry entry.

REPORTDIMCOUNT("<expression1">, <expression2>)
This function acts like the PageDimCount() function except that instead of
displaying the number of out of tolerance dimensions for the current page, it
displays the total number of out of tolerance dimensions for the entire report. In
addition, for <expression1>, you need to use CadReportObject1 or
TextReportObject1 as the ID, or leave it empty (with just the quotes).

For Custom Reports, you can only use this function with a CADReportObject,
because a TextReportObject cannot go on a Custom Report.

*REPORTVALUE(<expression1>)
This function displays the value of another object's property. It takes one
parameter, shown as expression1. This should be a string value of the object's
unique ID followed by a period and then the property's name. For example:
=REPORTVALUE("text1.text")

*REVNUM()
This function displays the revision number (the same as what is shown in the file
header).

*RGB(<expression1>, <expression2>, <expression3>,


<expression4>)
This function colors the string specified in expression1 to the color specified via
the RGB values of expression2, expression3, and expression4. See "Changing a
String's Text Color".

RIGHT(<expression1>, <expression2>)
Same as in PC-DMIS expression language.

ROUND(<expression1>, <expression2>)
Same as in PC-DMIS expression language.

*SECTION()
This function displays the current section number.

*SERNUM()
This function displays the serial number (the same as what is shown in the file
header).

303
Reporting Measurement Results

SIN(<expression>)
Same as in PC-DMIS expression language.

SORTUP(<expression>)
Same as in PC-DMIS expression language.

SORTDOWN(<expression>)
Same as in PC-DMIS expression language.

SQRT(<expression>)
Same as in PC-DMIS expression language.

*STATCOUNT()
This function returns the statistics count (the same as in the file header).

STR(<expression>)
Same as in PC-DMIS expression language.

STRING(<expression>)
Same as in PC-DMIS expression language.

SUM(<expression>
Same as in PC-DMIS expression language.

SYSTIME()
Same as in PC-DMIS expression language.

SYSTEMDATE(<expression>)
Same as in PC-DMIS expression language.

SYSTEMTIME(<expression>)
Same as in PC-DMIS expression language.

*TOGGLESTR(<expression1>, <expression2>)
This function pulls the toggle string from the resources base on the resource id
value in expression1. The function uses a negative number for cases where the
string should come from the strings resources. This function uses the value of
expression2 to specify the substring to return. The result is the substring.

*TOGGLESTRING(DATA_TYPE)
If the specified data type for the given command is of type toggle string, this
function returns the full toggle string.

*TOGGLEVALUE(DATA_TYPE)
If the specified data type for the given command is of type toggle string, this
function returns the index number (or toggle value) of the toggle string.

304
About Report Expressions

*TOL(<expression1>, <expression2>, <expression3>,


<expression4>)
expression1 is the string to color, expression2 is the test value, expression3 is the
maximum in-tolerance value, and expression4 is the minimum in-tolerance value.
If the test value is in tolerance (between the values for expression3 and
expression4), then the software colors the text black. Otherwise, the software
colors the text with the error color (usually red). You can define the error color in
the Color Editor dialog box (Edit | Preferences | Edit Window Colors).

For example, this code displays the text "In Tolerance" in black:

=TOL("In Tolerance",100,100.5,99.5)

This code displays the text "Out of Tolerance" in the error color (by default,
this is red):

=TOL("Out of Tolerance",99,100.5,99.5)

*TOLF(<expression1>, <expression2>, <expression3>,


<expression4>, <expression5>)
This function provides additional formatting capabilities beyond the TOL
expression. The first four parameters are the same as listed in the TOL function
above. The fifth expression determines the font, size, format, and color for an out-
of-tolerance condition. It expects this syntax:

"f:s:w:c"

f is the name of the font to use.

s is the size of the font in points.

w is the font's formatting, and it can be done using any of these:

B or BOLD for boldface formatting.

I or ITALIC for italic formatting.

R or REGULAR for regular formatting.

BI, BOLDITALIC, IB, or ITALICBOLD for both bold and italic formatting.

c is an RGB(r,g,b) color formatting where r = red, g = green, and b = blue.


Each value can be in the range of 0 to 255.

305
Reporting Measurement Results

Each of these items is optional and must be separated with a colon (:)
character. For example, to set only the font size, you could have ":14", but to
set only the color, you would need ":::RGB(0,0,0)".

This example formats any measured dimension that is out of tolerance with
an Arial font, size 12, with a boldface formatting and a red color.

=TOLF(DIM_MEASURED:N,DIM_OUTTOL:N,0.0,0.0,"Arial:12:B:RG
B(255,0,0)")

TOTALPAGEDIMCOUNT("ObjectID")
This function contains one parameter. If the function is empty (nothing between
the quotation marks), it returns the total number of dimensions in the current page.
If you type the ID of a CadReportObject or TextReportObject in the parameter,
PC-DMIS returns the total number of dimensions associated with that object.

For example, if you used this expression


=TotalPageDimCount("CadReportObject3"), PC-DMIS returns the
total number of dimensions associated with CadReportObject3.

You can also calculate the number of dimensions that contain a specific number of
axes. To do this, append ":N" to the ID, where N is a number that represents the
number of axes.

For example, typing


=TotalPageDimCount("CadReportObject1:4") would return the total
number of dimensions associated with CadReportObject1 that contained at
least four axes.

For Custom Reports, you can only use this function with a CADReportObject,
because a TextReportObject cannot go on a Custom Report.

TOTALREPORTDIMCOUNT("ObjectID")
This function is similar to the TotalPageDimCount() function with these important
differences: Instead of returning the number of dimensions for the current page, it
returns the total number of dimensions for the entire report. This works if there's a
CadReportObject or TextReportObject. If you have an object ID as your
parameter, it needs to be named CadReportObject1 or TextReportObject1.

306
About Report Expressions

For Custom Reports, you can only use this function with a CADReportObject,
because a TextReportObject cannot go on a Custom Report.

TRACEFIELD(<expression>)
This function displays the given tracefield's name and value in the report. The
value of the expression is a number value that represents the order of the listed
tracefields from top to bottom in your measurement routine. So to display the first
listed tracefield, the code would read: =TRACEFIELD(1)

UNIT(<expression>)
Same as in PC-DMIS expression language.

USERSTRING(<expression1>,<expression2>)
This function pulls a custom string from a comma separated value (CSV) text file
and displays that string in the label. See "Loading Strings from a Text File" for an
example of this function.

*VARIABLE(<expression1>,<expression2>)
This function displays the defined variable's value. This function takes one or two
parameters. expression1 is the string value that represents the variable's ID.
expression2 is an optional ID of another command ID or UID. See "Displaying a
Variable's Value" for more information.

VECX(<expression>)
Same as in PC-DMIS expression language.

VECY(<expression>)
Same as in PC-DMIS expression language.

VECZ(<expression>)
Same as in PC-DMIS expression language.

Operators for Report Expressions


<expression1> == <expression2>
Evaluates to 1 if expression1 equals expression2. Otherwise, evaluates to 0.

<expression1> >= <expression2>


Evaluates to 1 if expression1 is greater than or equal to expression 2. Otherwise,
evaluates to 0.

<expression1> <= <expression2>


Evaluates to 1 if expression1 is less than or equal to expression 2. Otherwise,
evaluates to 0.

307
Reporting Measurement Results

<expression1> > <expression2>


Evaluates to 1 if expression 1 is greater than expression2. Otherwise, evaluates to
0.

<expression1> < <expression2>


Evaluates to 1 if expression 1 is less than expression2. Otherwise, evaluates to 0.

<expression1> - <expression2>
Subtracts expression2 from expression1.

<expression1> / <expression2>
Divides expression1 by expression2.

<expression1> % <expression2>
Returns the remainder from expression1 divided by expression2 if any.

<expression1> * <expression2>
Multiplies expression1 by expression2.

<expression1> <> <expression2>


Compares expression1 to expression 2. If they don't match, it evaluates to 1. If
they do match, it evaluates to 0.

-<expression>
The unary minus operator negates the value of the operand in expression.

!<expression>
Logical NOT operator. This inverts the value of the variable or expression. If the
<expression> evaluates to TRUE, the !<expression> evaluates to FALSE. If the
<expression> evaluates to FALSE, the !<expression> evaluates to TRUE.

<expression1> AND <expression2>


Performs a binary AND operation on two numbers. Otherwise, concatenates
strings or numbers together in the case of mixed types.

<expression1> OR <expression2>
Performs a binary OR operation on two numbers.

<expression1> + <expression2>
Adds expression1 and expression2 together.

Some Reporting Expressions Examples


The following topics provide you with a few examples of things you can do with the
Reporting expression language:

308
About Report Expressions

• Displaying a Variable's Value


• Changing a String's Text Color
• Loading Strings from PC-DMIS
• Loading Strings from a Text File

Use the functions and operators in the "Functions and Operators" topic, to create your
own Reporting expressions.

Displaying a Variable's Value


PC-DMIS's reporting language lets you display a variable's value in your report by using
the Variable() function. This function has the following syntax:

Variable(<varname>, [<optional command id or uid>])

The first parameter, coerced to a string type, represents the name of the variable. The
second optional parameter can be used to solve for the variable's value relative to
another command.

For example, suppose you have this code in your measurement routine:

ASSIGN/V1=2
F1=FEAT/CIRCLE...
ASSIGN/V1=F1.X
COMMENT/OPER,"Some comment text"
For the purposes of this example, assume that the comment has a unique ID or "UID" of
245.

Now consider the following examples with the code above:

309
Reporting Measurement Results

=VARIABLE("V1") - If there are no other statements setting the value of V1


in the report then the value may be either 0, 2, or the same as the measured centroid x
value of feature F1. It all depends on which commands have already executed at the
point that the report expression is evaluated and which command is currently being
processed for the report.

=VARIABLE("V1","F1") - If this is the only feature named "F1" in the measurement


routine, then the result of evaluating this expression should be 2 since V1 is assigned to
2 directly above feature F1.

=VARIABLE("V1",245) - In this case, the UID is used; the value of this expression on
the report should be the same as F1.X.

Individual cells of a GridControlObject cannot acquire a variable's value from


the measurement routine. In most cases, you will need to use Text objects.

Variables and Headers


Normally, you cannot display a variable's value inside your report's file header because
PC-DMIS evaluates the file header before executing statements in the measurement
routine. So, when the file header attempts to reference a variable that hasn't yet been
created, PC-DMIS will display a zero value. However, some options do exist to get
information from your measurement routine into your header:

Option 1 - Use the Trace Fields instead of Variables


Use trace fields instead of variables in your measurement routine to capture the
information and then use the =TRACEFIELD() function inside the desired cell in
the GridControlObject of the header's label template to reference it. Trace fields
force the template to re-evaluate the report based on the new information causing
the trace field to appear.

Advantages / Disadvantages

• Advantages - Relatively easy to set up.


• Disadvantages - You aren't actually using variables. Trace fields are used
instead and have their own limitations.

310
About Report Expressions

Procedure

Step 1: Open the File_Header.lbl file in PC-DMIS and Modify the


GridControlobject to hold another row of data.

1. In PC-DMIS access the label template editor (File | Reporting |


Edit | Label Template) and open File_Header.lbl. It will appear in
the label template editor. You will see the information is contained
inside an object called a GridControlObject.
2. Select the GridControlObject and right-click on it. The Properties
dialog box appears containing the properties making up the
GridControlObject. Add another row, by changing NumRows to 3
and pressing TAB. Notice that the background isn't tall enough to
support the added row.
3. From the drop down list on the Properties dialog box, select
TheFrame/TheView and change the Height property to 100 and
press TAB to accept the change.

Step 2: Add a report expression into the GridControlObject to accept a trace


field's information

1. Select the GridControlObject again.


2. If the handles (green boxes) do not yet include the newly added
row, drag the green handles downward until they do.
3. Double-click to make the GridControlObject "active". This shows all
the behind-the-scenes expressions.
4. Select the cell that will hold the trace field's value and type:
=TRACEFIELD(1) and then press TAB. This expression tells PC-
DMIS to put the data for the first trace field in that cell. For example,
if you wanted the second trace field's data, you would use
=TRACEFIELD(2). (See the attached image file below.)
5. Play around with the cells and format them as desired. The best
way to do this is to select one or more cells within the grid and then
right-click on it. The Grid Properties dialog box appears.
6. Deactivate the GridControlObject by clicking outside of it.
7. Save your changes.

Step 3: Test your changes.

1. Execute your measurement routine.


2. Access the Report window (View | Report Window).

311
Reporting Measurement Results

3. Click the Redraw the Report icon on the Reporting window's


toolbar.
4. The trace field's info should now appear in the header.

Option 2 - Embed the Report Template


Embed the report template into your measurement routine sometime after the
ASSIGN statements have been defined, and then send the variable's value to the
label template as a parameter. Add additional rows or cells as needed and on top
of the added cells, add and size a Text object for each variable you want to
display. Finally, modify the Text property through a parameter of the
REPORT/TEMPLATE command, like this:

ASSIGN/V1="A String Value to Pass"


CS1=REPORT/TEMPLATE,FILENAME=TEXTONLY.RTP,AUTOPRINT=NO,S
ection=-1
PARAM/TEXT1.TEXT=V1
PARAM/=
ENDREPORT/

Because the label template is merged into the report template, you can modify
certain parameters on the label template by referencing the report template in the
above fashion.

Advantages / Disadvantages

• Advantages - Variables will now appear in your final report's header.


• Disadvantages - Somewhat difficult to set up as you will need to add a
Text object into your label template in addition to the code to embed the
report template into the measurement routine. The main disadvantage to
this approach, however, is that the report will be generated twice, one
after the other (once from PC-DMIS's default functionality and again from
the embedded REPORT/TEMPLATE code block).

Option 3 - Put the header information directly into the report


Instead of using a report template that refers to an external label template for the
header, such as File_Header.lbl, recreate the GridControlObject from the
header's label template directly inside your report template. Add additional rows or
cells as needed and on top of the added cells, add and size a Text object for each
variable you want to display. Then for each Text object use the =VARIABLE()
function to pull in the variable information. For example, =VARIABLE("V1").

Make these remaining modifications inside the report template:

312
About Report Expressions

1. In the TextReportObject change the rules so that the header label isn't
used.
2. Set these properties for the current section, Section1:

Command Set = All Commands

Maximum Number of Pages = 1

3. Add a second section, Section2, and give it a TextReportObject as well,


again changing its rules so that a header label isn't used.
4. Set these properties for Section2:

Command Set = Continue From Previous Section

Maximum Number of Pages = 0 (meaning there is no maximum)

Advantages / Disadvantages

• Advantages - Variables will now appear in your final report's header.


• Disadvantages - Somewhat difficult to set up since you have to recreate
the GridControlObject inside the report template, add Text objects for
each variable, and add an additional report section. Additionally, any
editing done to the report, such as turning on "Show Feature" or changing
Dimensions to "Out of tolerance Only", needs to be done twice, once for
page 1 (first section) and once for the other pages (section 2).

Option 4 - Use a generic feature to force report generation


This option uses an empty Generic feature to force the label template to re-
evaluate the report and pull needed variables values into your final report.

In your measurement routine, create an empty Generic feature and give it a


descriptive name such as:

REPORTHEADER=GENERIC/NONE,DEPENDENT,CARTESIAN,OUT,$

Next, modify the header label template, adding additional cells as needed to the
GridControlObject, and then on top of the added cells, add and size a Text
object for each variable you want to display. Now set the Text property for each
Text object to use the =VARIABLE() function to pull in the variable information. In
this option, however, you need to refer to the generic feature by using use the
extra parameter in the =VARIABLE() function. For example,
=VARIABLE("V1","REPORTHEADER")

313
Reporting Measurement Results

Advantages / Disadvantages

• Advantages - Probably the most versatile approach. Variables will now


appear in your final report's header. You will not need to edit the final
report twice as in Option 2.
• Disadvantages - Somewhat difficult to set up since you will need to
include an empty Generic feature in your measurement routine, and add
Text objects for each variable inside the label template.

Changing a String's Text Color


Using the RGB Function

The Reporting expression language lets you use a RGB function to define an RGB (Red
Green Blue) color value and apply it to a string of characters in expression text. This
function takes four parameters, a string parameter, followed by comma separated RGB
parameters, like this:

=RGB(string,R,G,B)

If you type this function in the Cell Expression box (or cell) of the GridControlObject,
click OK, and then click outside of the object, PC-DMIS evaluates the expression and
gives the text the specified color value.

Cell Expression box showing the RGB expression

For example, if you type this expression into a cell,

=RGB("Blue Text",0,0,255) + RGB(" Black Text",0,0,0) + RGB("


Yellow Text",255,255,0)

then the words would look like this in a template editor:

314
About Report Expressions

Displaying a Dimension Color with RGB

For the second parameter in the RGB function, if you use a value that exceeds 255, PC-
DMIS interprets that parameter as a COLORREF value instead of a standard 0 - 255
RGB value. In this case, PC-DMIS ignores the second and third parameters (although
you do need to include them). You can use this approach to return the color of the
dimension's axis if you use the DIM_RPT_TOLERANCECOLOR1 data type.

For example, suppose you use this expression in a cell of a GridControlObject:

=RGB(NOMINAL:N,DIM_RPT_TOLERANCECOLOR1:N,0,0)

This grabs the nominal value of the current axis undergoing evaluation and sets the
color to that axis's dimension color.

The :N behaves as a variable that holds the current dimension axis index so that the
expression returns the color value of each axis.

You can also specify a specific axis. For example, suppose you have a dimension with
three axes, X, Y, and Z.

• DIM_RPT_TOLERANCECOLOR1:1 returns the color value for the first axis, X.


• DIM_RPT_TOLERANCECOLOR1:2 returns the color value for the second axis Y.
• DIM_RPT_TOLERANCECOLOR1:3 returns the color value for the third axis Z.

If you do not define the optional index (:N), it returns the color of the dimension itself.

Using the Color Function

The Color function takes two parameters. The first, a color parameter, is actually a
number that represents one of the principle Edit window colors. The second, is the
string value to which PC-DMIS applies the color.

=COLOR(1, "My Text")

The first parameter is a value of 1 to 4 and passes the Edit window color that associated
with the following:

1 passes the Marked Color

2 passes the Unmarked Color

3 passes the Step Mode Color

4 passes the Error Color

315
Reporting Measurement Results

These colors are defined in the Edit window's Color Editor dialog box (Edit |
Preferences | Edit Window Colors). For information on this dialog box, see "Defining
Edit Window Colors" in "Setting Your Preferences" for information.

Loading Strings from PC-DMIS


Similar to how you can change the text color for a cell in the "Changing Expression Text
Color" topic, the Reporting expression language lets you pull strings from PC-DMIS's
current running language by using this expression:

=LOADSTR(<integer expression>)

This function takes a single parameter, an integer number that corresponds to the value
of a string located in resource.dll or strings.dll.

• A positive number pulls the string from the resource.dll file.


• A negative number pulls the string from the strings.dll file.

If you type this function in the Cell Expression box (or cell) of the GridControlObject,
click OK, and then click outside of the object. PC-DMIS evaluates the expression and
returns the string assigned to the specified integer value.

This functionality was added primarily so that the label templates that ship with
PC-DMIS use string data from your current language.

Loading Strings from a Text File


With PC-DMIS, you can load custom strings from a comma separated value (CSV) text
file and displaying them inside of a customized label. This is very handy if you need
custom strings displayed in a different language. You only have to localize the csv file
and provide it to the operator.

The Syntax
The USERSTRING function takes two parameters:

=USERSTRING(<expression1>,<expression2>)

• The first parameter, Expression 1, is a string pathway that defines the location of
the CSV file. This must be inside quotes. If the file cannot be found, due to an
incorrect pathway or a lack of read permissions, the function will return, "File
cannot be opened".

316
About Report Expressions

• The second parameter, Expression 2, is the index number in the CSV file
associated with the string of text to display. If the CSV file is accessible, but you
specify an index number that doesn't exist in the CSV file, the function will return,
"index not found".

The CSV File

The csv file must contain on an individual line: the unique index number, then the
comma, and then the string.

Multi-line strings can be defined by using a new line character (\n).

For example, consider this sample CSV file:

10,The universe is your playground.


1,Place the part on the table.
3,This is a \nMulti-line string.
...
230,"Bleeding Edge. Cutting Edge."
200,Circle 6001
201,5+5

Notice that the numbers preceding each string don't need to be sequential; they only
need to be unique. Quotation marks and other characters will come through as typed in
the CSV file. Numbers are not mathematically evaluated.

An Example

Suppose the above CSV file was stored in your d:\temp\ directory with a file name of
MyStrings.csv. If you wanted to display four different custom strings in a label, your
expressions in the cells of the GridControlObject on that label might look like this:

=USERSTRING("d:\temp\MyStrings.csv",1)
=USERSTRING("d:\temp\MyStrings.csv",3)
=USERSTRING("d:\temp\MyStrings.csv",230)
=USERSTRING("d:\temp\MyStrings.csv",201)

Your label, once evaluated would look like this:

317
Reporting Measurement Results

Using Data Types to Find a Report Expression


When using expressions, you usually use expressions that pull data from PC-DMIS.
You need to make sure that the command or feature you associate with the label
template to do this has the data you are trying to display. Data Types can help you find
the correct expression to use.

For example, suppose you create a label template that has a GridControlObject, and
in one of the cells you type this expression to display a feature's measured X data:

=MEAS_X

Now, if you create a report template, add a TextReportObject, and use the Rule Tree
Editor to associate your label template with PREHIT commands, in the Report window
the cell will not display anything. Why? Because the PREHIT command does not have a
measured X field. To use the correct expression, you can view data types for different
fields in the Edit window's command mode.

This procedure explains how to turn on and view data types:

1. Access the Edit window.


2. Place the Edit window into Command mode.
3. Right-click on the Edit window. A shortcut menu appears.

318
About Report Expressions

Data Type Information menu item

4. Select Change Popup Display | Data Type Information.


5. Hover your mouse pointer over a field in a command, and PC-DMIS will display a
small, yellow popup that shows that field's data type. The first part of the value in
parentheses is the data type and an equivalent expression exists in the list of
expressions.

Consider this example:

This data type popup shows that THEO_X is a valid expression for this command. If you
typed "=THEO_X" into an appropriate location, PC-DMIS would display this feature's
theoretical X value.

Using data types you can ensure that your report and label templates are using
expressions supported by that command.

A List of Available Data Types


This list of data types displays the data type names in alphabetical order, their
associated type numbers, descriptions, index values and value strings as appropriate.
When using data types inside VB scripts in template events and rules, you may need to

319
Reporting Measurement Results

use the data type number as not all script locations accept the enumerated data type
value.

-A-
Data Type Value
Number Data Type Name Index
Description String
481 ABOVEBELOW_CONFIG
409 ADDITIONAL_CHART For SPC
Show alignment in
153 ALIGN_LIST alignment list (Yes /
No)
Toggle field for
300 ANGLE_COMP_TOGGLE complement state of
angle dimensions
Angle Offset for loops
149 ANGLE_OFFSET
and rotary tables
The reference angle
373 ANGULARITY_NOM_ANGLE used, not the
dimension's nominal
Numeric
103 ANGVEC_I Angle vector i 0
value
Numeric
104 ANGVEC_J Angle vector j 0
value
Numeric
105 ANGVEC_K Angle vector k 0
value
Dimension arrow
164 ARROW_MULTIPLIER
multiplier value
479 ARTICULATEDARM_TYPE
234 AUTO_CLEAR_PLANE Auto clear plane flag
461 AUTO_ONERROR_TYPE
533 AUTO_PH9
Auto print flag for
219 AUTO_PRINT
hyper report object
Turn autotrigger
295 AUTOBEEPING
beeping on/off
52 AUTOFIT_CONSTRAINT Toggle for type of

320
About Report Expressions

constraint on best fit


alignment
Tolerance zone for
298 AUTOTOLZONE
autotrigger
Turn autotrigger on or
294 AUTOTRIGGERONOFF
off.
Flag for iterative
140 AVERAGE_ERROR
alignments
749 AXIS_DESCRIPTION
747 AXIS_MINUS_TOL
132 AXIS_NOMINAL Axis
748 AXIS_NOMINAL
746 AXIS_PLUS_TOL

-B-
Value
Number Data Type Name Data Type Description Index
String
Math type used to calculate
51 BF_MATH_TYPE
best fit
50 BOUND_TYPE Bound / Unbound
Gets and sets the boundary
967 BOUDARY_OFFSET offset distance during a Void
Detection.
360 BOUNDARY_POINT_X Boundary Point x
361 BOUNDARY_POINT_Y Boundary point y
362 BOUNDARY_POINT_Z Boundary point z
476 BSMETHOD_TYPE
207 BUFFER_SIZE_TYPE File i/o buffer size

-C-
Data Type Value
Number Data Type Name Index
Description String
492 CAD_COMP
237 CAD_TOLERANCE CAD tolerance for

321
Reporting Measurement Results

perimeter scans
471 CALC_STYLE_FILE
413 CENTER_POINT For SPC
478 CENTER_ROTATION_MEAS Best fit alignments
477 CENTER_ROTATION_THEO Best fit alignments
445 CHART_SUB_TYPE For SPC
388 CHART_TYPE For SPC: charts
Circular or straight
42 CIRC_TYPE probe motion (circles
and cylinders)
614 CLIP_LEFT_DIST
604 CLIP_LOW_DIST
615 CLIP_RIGHT_DIST
603 CLIP_UP_DIST
On / Off setting for
244 COL132_TYPE
column 132 object
701 COLUMN_HDR
Sets the column id
296 COLUMN_ID for a load or unload
column command
For external
245 COMMAND_STRING
command object
189 COMMENT Comment text
Add new type for
709 COMMENT_INPUT
comment input value
190 COMMENT_TYPE Comment type
724 COMPOSITE
468 CONE_CONVEX_TYPE
For cones: show
60 CONE_LENGTH_ANGLE_TYPE
length or angle
39 COORD_TYPE Coordinate System
621 COP_BOOLEANTYPE
618 COP_COLORMAP

322
About Report Expressions

619 COP_COPLEMENT
616 COP_EXPORTFILETYPE
543 COP_FILTER
622 COP_IMPORTFILETYPE
617 COP_SELECTIONTYPE
544 COP_SIZE
545 COP_TYPE
425 CPOINT_DIAM
428 CPOINT_F_SCANSPEED
422 CPOINT_I
423 CPOINT_J
424 CPOINT_K
426 CPOINT_SCAN_CROSS_TOTAL
427 CPOINT_SCAN_DENSITY
430 CPOINT_TYPE
419 CPOINT_X
420 CPOINT_Y
421 CPOINT_Z
For best fit 2D/3D
433 CREATE_WEIGHTS
alignments
For curves - type of
65 CURVE_TYPE
curve

-D-
Data Type Value
Number Data Type Name Index
Description String
Database
memory pages
252 DATA_MEM_PAGES
for statistics
object
Database read
250 DATA_READ_LOCK lock for statistics
object

323
Reporting Measurement Results

Database write
251 DATA_WRITE_LOCK lock for statistics
object
731 DATUM1_MODIFIER
734 DATUM1_MODIFIER2
This is because
DATUM and
DATUM2 are
725 DATUM2 used in two
different groups
in summary
mode.
732 DATUM2_MODIFIER
735 DATUM2_MODIFIER2
733 DATUM3_MODIFIER
736 DATUM3_MODIFIER2
For SPC: chart
389 DB_CHART_NAME
name
386 DB_QUERY_OP For SPC
387 DB_SOURCE_NAME For SPC
459 DB_SOURCE_TYPE For SPC
FILE/CLOSE,
539 DELETE_TYPE fptr, KEEP |
DELETE
Subroutine
203 DESCRIPTION parameter
description
This is because
DESCRIPTION
and
DESCRIPTION2
727 DESCRIPTION2
are used in two
different groups
in summary
mode.
Destination
133 DEST_EXPR expressions
(assign,

324
About Report Expressions

subroutine,
hyper report)
353 DEV_DIAM Dev diam value
280 DEV_PERPEN_CENTERLINE
350 DEV_X Dev x value
351 DEV_Y Dev y value
352 DEV_Z Dev z value
390 DEVIATION_ANGLE Deviation angle
Dimension
180 DEVIATION_SYMBOLS format dev
symbols toggle
737 DEVPERCENT_NOM
739 DEVPERCENT2
Digit count for
dmis file
199 DIGIT_COUNT
read/write
command
Dimension
324 DIM_BONUS
bonus
Dimension
340 DIM_DEVIATION
deviation
Dimension
182 DIM_HEADING format heading
item
For Best Fit 2d
304 DIM_ID
Alignments
Dimension info
160 DIM_INFO_LOC object location
axis toggle
Dimension info
159 DIM_INFO_ORDER
order toggle
Dimension info
object tp
161 DIM_INFO_TP_LOC
location axis
toggle
173 DIM_LENGTH Dimension

325
Reporting Measurement Results

length
754 DIM_LENGTH2
Dimension max
332 DIM_MAX
value
Measured
328 DIM_MEASURED
dimension value
Dimension min
336 DIM_MIN
value
Dimension
344 DIM_OUTTOL
outtol
703 DIM_RPT_DATUM
705 DIM_RPT_DEVPERCENT
704 DIM_RPT_GRAPHIC
706 DIM_RPT_ISBILATERAL
702 DIM_RPT_ISDATUM
707 DIM_RPT_NUMZONES
Gets the color of
the dimension
as determined
917 DIM_RPT_TOLERANCECOLOR1
by PC-DMIS.
This is the
primary color.
Gets the
secondary color
for bilateral
dimensions that
have a
918 DIM_RPT_TOLERANCECOLOR2 secondary color.
If the color is not
defined for this
dimension, it
returns -1 as the
value.
Dimension
177 DIM_TEXT format dim text
toggle
Dimension
178 DIM_TEXT_OPTIONS
format dim text

326
About Report Expressions

options toggle
510 DISPLAY_ADVANCED_PARAMETERS
Scan flag (yes /
236 DISPLAY_HITS no) for display
of scan hits
Point info show
184 DISPLAY_ID
id toggle
607 DISPLAY_PROBE_PARAMETERS
Trace field
object yes/no
256 DISPLAY_TRACE
toggle for dialog
display
Point info show
185 DISPLAY_TYPE
type toggle
155 DISTANCE Distance
676 DRF_COLUMN_HDR
681 DRF_ROTATIONX
682 DRF_ROTATIONY
683 DRF_ROTATIONZ
677 DRF_SEGNAME
678 DRF_SHIFTX
679 DRF_SHIFTY
680 DRF_SHIFTZ
641 DRF_TBLHDR
Leapfrog type:
291 DTYPE_LEAPFROGFULLPARTIAL Full leapfrog or
partial leapfrog
Number of hits
to be taken
290 DTYPE_LEAPFROGNUMHITS
during leapfrog
procedure
Type of leapfrog
289 DTYPE_LEAPFROGTYPE
being performed

327
Reporting Measurement Results

-E-
Value
Number Data Type Name Data Type Description Index
String
Radian
99 END_ANG End angle 0
value
144 END_NUM End number of loop
Ending
787 END_OFFSET Ending depth 0
depth value
467 ERROR_LABEL
Error mode for on error flow
202 ERROR_MODE
control command
Error type for on error flow
201 ERROR_TYPE
control command
Exclusion zone command is
292 EXCLUSION_ZONE
on or off
Is the attached measurement
293 EXECUTE
routine executed (Yes / No)
595 EXPOSURE

-F-
Data Type Value
Number Data Type Name Index
Description String
79 F_AUTOMOVE Automove distance
85 F_BOXLENGTH
84 F_BOXWIDTH
The only numeric
88 F_CHECK associated with the
CPCDcheck feature
87 F_CIRCRADIN
86 F_CIRCRADOUT
81 F_CORNER_RADIUS
Depth of Depth
78 F_DEPTH 0
measurements value
82 F_INCREMENT

328
About Report Expressions

Measurement
Offset
80 F_INDENT offsets for various 1
value
features
Location value for
243 F_LOCATION
section scans
Maximum X
89 F_MAXACCELX
acceleration
Maximum Y
90 F_MAXACCELY
acceleration
Maximum Z
91 F_MAXACCELZ
acceleration
Dimension minus tol
168 F_MINUS_TOL
value
95 F_MOVESPEED Move speed
74 F_OFFSET Offset value
76 F_PITCH Auto feature pitch
Dimension plus tol
167 F_PLUS_TOL
value
97 F_SCANSPEED Scan speed
434 F_SIZE for SPC
Max
75 F_SPACER Auto feature spacer 0 distance
value
Sheet metal Thickness
77 F_THICKNESS 0
thickness value
593 F_THICKNESS_EDGE
83 F_TOLERANCE
96 F_TOUCHSPEED Touch speed
File i/o fail on exist
208 FAIL_ON_EXIST
mode
303 FEAT_TYPE Feature Type
Field width for dmis
198 FIELD_WIDTH file read/write
command
206 FILE_COMMAND_TYPE File i/o command

329
Reporting Measurement Results

type
152 FILE_NAME File name
File pointer name
197 FILE_POINTER for file i/o
commands
598 FILTER_NEIGHBOR_NUM
606 FILTER_TOGGLE
600 FILTER_TOL_ABOVE
601 FILTER_TOL_BELOW
602 FILTER_TOL_RIGHT
Basic scan filter
472 FILTER_TYPE
type
For the check
460 FIND_HOLE_PERCENT command and find
hole check distance
Selects between X,
Y, Z, or user
54 FIND_NOM_AXIS_TYPE
defined nominal
axis
Type for find noms
233 FIND_NOMS_TYPE
mode
Use find hole
47 FINDHOLE_TYPE
algorithm (Yes / No)
527 FINDNOMS_BESTFIT
528 FINDNOMS_ONLYSELECTED
452 FIT
465 FIXTURE_TOL
Type for load fixture
226 FIXTURE_TYPE
object
Fly mode Off/On
246 FLY_MODE_TYPE
toggle
560 FREQUENCY

-G-
Number Data Type Name Data Type Index Value

330
About Report Expressions

Description String
183 GAP_ONLY_TYPE ON / OFF toggle
708 GDT_SYMBOL
730 GDT_SYMBOL2
Generic feature
alignment type
64 GEN_ALIGN_TYPE
(independent /
dependent)
63 GEN_FEAT_TYPE Generic feature type
Use graphical
162 GRAPH_ANALYSIS analysis on
dimension (yes / no)
Auto Feature cad
785 GRAPH_ANALYSIS_MINUS_TOL point minus
tolerance
Auto Feature cad
784 GRAPH_ANALYSIS_PLUS_TOL
point plus tolerance
Auto Feature cad
783 GRAPH_ANALYSIS_POINT_SIZE
point size
Dimension info and
458 GRAPH_OPTION point info
commands
408 GRID For SPC

-H-
Value
Number Data Type Name Data Type Description Index
String
483 HIGH_ACCURACY
High threshold for temp comp
223 HIGH_THRESHOLD
object
407 HISTOGRAM For SPC
359 HIT_TYPE Hit type
Interior/Exterior measurement
68 HITINT_TYPE
flag

331
Reporting Measurement Results

-I-
Data Type Value
Number Data Type Name Index
Description String
2 ID Object id
For ignore motion
392 IGNOREMOTIONERRORS_TYPE
errors command
Array index end
205 INDEX_END
number
Array index start
204 INDEX_START
number
72 INIT_HITS Initial hits
40 INOUT_TYPE Inside / Outside
596 INTENSITY
150 INTERNAL_EXTERNAL Recall Alignment
For IO channel
454 IOCHANNEL_NUMBER management
commands
No longer used,
457 IOCHANNEL_PULSE_DURATION probably should be
removed
No longer used,
456 IOCHANNEL_PULSE_INTERVAL probably should be
removed
No longer used,
455 IOCHANNEL_PULSE_WIDTH probably should be
removed
634 ISLAND_AI
635 ISLAND_AJ
636 ISLAND_AK
638 ISLAND_CLEARANCEDIST
625 ISLAND_DIAM
631 ISLAND_I
632 ISLAND_J
633 ISLAND_K

332
About Report Expressions

626 ISLAND_LENGTH
637 ISLAND_TYPE
627 ISLAND_WIDTH
628 ISLAND_X
629 ISLAND_Y
630 ISLAND_Z
Best fit item used in
138 ITEM_USED calculation of
alignment
Iterate columns
354 ITERATE_COLUMNS
setting

-J-

No Entries Available

-K-

No Entries Available

-L-
Value
Number Data Type Name Data Type Description Index
String
Label field for flow
200 LABEL_ID control objects that
reference labels
729 LEADER_LINE_ID
480 LEFTYRIGHTY_CONFIG
Ref id for a level feature
4 LEVEL_REF_ID
of an iterative alignment
Filter object - linear or
62 LIN_POL_FILT_TYPE
polar filter
782 LINE1_BONUS
643 LINE1_CALLOUT
644 LINE1_COLUMN_HDR
650 LINE1_DEV

333
Reporting Measurement Results

651 LINE1_DEVPERCENT
750 LINE1_DEVPERCENT_NOM
752 LINE1_DEVPERCENT2
645 LINE1_FEATNAME
652 LINE1_ISBILATERAL
768 LINE1_MAX
647 LINE1_MEAS
769 LINE1_MIN
649 LINE1_MINUSTOL
646 LINE1_NOMINAL
653 LINE1_NUMZONES
765 LINE1_OUTTOL
648 LINE1_PLUSTOL
642 LINE1_TBLHDR
751 LINE1_USE2DEVIATIONS
686 LINE2_AXIS
658 LINE2_BONUS
655 LINE2_CALLOUT
656 LINE2_COLUMN_HDR
660 LINE2_DATUMSHFT
662 LINE2_DEV
663 LINE2_DEVANG
664 LINE2_DEVPERCENT
740 LINE2_DEVPERCENT_NOM
742 LINE2_DEVPERCENT2
657 LINE2_FEATNAME
697 LINE2_ISBILATERAL
695 LINE2_MAX
688 LINE2_MEAS
696 LINE2_MIN

334
About Report Expressions

694 LINE2_MINUSTOL
687 LINE2_NOMINAL
698 LINE2_NUMZONES
766 LINE2_OUTTOL
693 LINE2_PLUSTOL
654 LINE2_TBLHDR
659 LINE2_TOL
661 LINE2_UNUSEDZONE
741 LINE2_USE2DEVIATIONS
669 LINE3_BONUS
666 LINE3_CALLOUT
667 LINE3_COLUMN_HDR
671 LINE3_DATUMSHFT
673 LINE3_DEV
674 LINE3_DEVANG
675 LINE3_DEVPERCENT
743 LINE3_DEVPERCENT_NOM
745 LINE3_DEVPERCENT2
668 LINE3_FEATNAME
699 LINE3_ISBILATERAL
774 LINE3_MAX
771 LINE3_MEAS
775 LINE3_MIN
773 LINE3_MINUSTOL
770 LINE3_NOMINAL
700 LINE3_NUMZONES
767 LINE3_OUTTOL
772 LINE3_PLUSTOL
665 LINE3_TBLHDR
670 LINE3_TOL

335
Reporting Measurement Results

672 LINE3_UNUSEDZONE
744 LINE3_USE2DEVIATIONS
355 LOAD_TYPE Load setting
Feature Locator BMP
287 LOCATOR_BMP
On/Off
Feature Locator WAV
288 LOCATOR_WAV
On/Off
Low force for option
210 LOW_FORCE
probe object
Low threshold for temp
224 LOW_THRESHOLD
comp object

-M-
Data Type Value
Number Data Type Name Index
Description String
Machine type for
227 MACHINE_TYPE load machine
object
485 MAGNIFICATION
176 MAN_RETRACT
Manual fine
94 MANUAL_FINE_PROBING
probing
Whether manual
pre-position
534 MANUAL_PREPOSITION
needed on vision
target
Material coefficient
221 MATERIAL_COEFFICIENT for temp comp
object
Setting for variable
242 MAX_ANGLE
technique on scans
Max force for
209 MAX_FORCE
option probe object
Setting for variable
240 MAX_INCREMENT
technique on scans
491 MEAN

336
About Report Expressions

569 MEAS_A
For CMT
612 MEAS_A2 characteristic point
1
30 MEAS_ANGLE Measured angle
721 MEAS_AREA
556 MEAS_DEPTH
29 MEAS_DIAM Measured diameter
584 MEAS_EA
585 MEAS_EH
624 MEAS_END_ANG
583 MEAS_ER
Measured endpoint
313 MEAS_EX
x component
Measured endpoint
314 MEAS_EY
y component
Measured endpoint
315 MEAS_EZ
z component
552 MEAS_FLUSH
554 MEAS_GAP
570 MEAS_H
For CMT
613 MEAS_H2 characteristic point
1
306 MEAS_HEIGHT Measured height
25 MEAS_I Measured i
26 MEAS_J Measured j
27 MEAS_K Measured k
28 MEAS_LENGTH Measured length
Measured minor
305 MEAS_MINOR_AXIS
axis (ellipse)
719 MEAS_PERIMETER
568 MEAS_R

337
Reporting Measurement Results

For cmt
611 MEAS_R2 characteristic point
1
581 MEAS_SA
582 MEAS_SH
Measured slot
vector i - See the
307 MEAS_SLOTVEC_I
"Slot Vector Data
Type" note below.
Measured slot
vector j - See the
308 MEAS_SLOTVEC_J
"Slot Vector Data
Type" note below.
Measured slot
vector k - See the
309 MEAS_SLOTVEC_K
"Slot Vector Data
Type" note below.
580 MEAS_SR
623 MEAS_START_ANG
Measured
310 MEAS_SX startpoint x
component
Measured
311 MEAS_SY startpoint y
component
Measured
312 MEAS_SZ startpoint z
component
316 MEAS_WIDTH Measured width
Hit point measured point X-
22 MEAS_X
x number Coordinate
For CMT
396 MEAS_X2 characteristic point
1
Hit point measured point Y-
23 MEAS_Y
y number Coordinate
For CMT
397 MEAS_Y2
characteristic point

338
About Report Expressions

1
Hit point measured point Z-
24 MEAS_Z
z number Coordinate
For CMT
398 MEAS_Z2 characteristic point
1
Flag for iterative
141 MEASURE_ALL_FEATURES
alignments
Measure order for
edge feature
59 MEASURE_ORDER_TYPE
SURFACE/ EDGE/
BOTH
Determines plane
in which solution
66 MEASURED_2D3D_TYPE
will lie or 3D
solution
106 MEASVEC_I Measure vector i
107 MEASVEC_J Measure vector j
108 MEASVEC_K Measure vector k
357 METHOD_TYPE Scan method type
100 MIDPOINT_X Midpoint x
101 MIDPOINT_Y Midpoint y
102 MIDPOINT_Z Midpoint z
Setting for variable
241 MIN_ANGLE
technique on scans
Setting for variable
239 MIN_INCREMENT
technique on scans
486 MINOR_WORD_TOGGLE
58 MODE_TYPE MANUAL or DCC
Use auto move
45 MOVE_TYPE
(yes / no)

-N-
Data Type Value
Number Data Type Name Index
Description String

339
Reporting Measurement Results

Number of control
429 N_CONTROLPOINTS
points in a scan
Number of hits per 1 or
70 N_HITS 0
row more
Toggle field for fixed
55 N_INIT_HITS_TYPE
number of init hits
Toggle field for fixed
56 N_PERM_HITS_TYPE
number of perm hits
1 or
71 N_ROWS Number of rows 0
more
Number of polygon
489 N_SIDES
sides
Empty stats dir field
249 NEW_STATS_DIR in editor for statistics
object
New tip in move ph9
157 NEW_TIP
offset
No type, default
0 NINGUNO_TIPO value, used with
constants
Allow the feature
"YES"
826 NO_APPROACH_VECTOR_FLIP vector to be flipped 0
or "NO"
during optimization
482 NOFLIPFLIP_CONFIG
Dimension nominal
166 NOMINAL
value
Vision Nominal
321 NOMINAL_COLOR
Color
Normal scan mode
232 NORM_RELEARN or re-learn nominals
mode
Number of control
317 NUM_CONTROL_POINTS
points
Number of points
320 NUM_FIT_POINTS used for fitting
surface
356 NUM_ITERATIONS Number of iterations

340
About Report Expressions

Return data for


215 NUM_RETURN_DATA
option probe object

-O-
Value
Number Data Type Name Data Type Description Index
String
61 OFFSET_LINE_METHOD method for offset lines
offset tolerance for
238 OFFSET_TOLERANCE
perimeter scans
156 OLD_TIP old tip in move ph9 offset
Initially implemented for
use with IGNOREROTAB
285 ONOFF_TYPE
but can be used with any
ON OFF toggle field
620 OPERTYPE
Origin data point for temp
220 ORIGIN
comp object
Ref id for an origin
6 ORIGIN_REF_ID feature of an iterative
alignment
449 OUTPUT_DMIS_REPORT DMO reporting
448 OUTPUT_FEAT_W_DIMENS DMO reporting
447 OUTPUT_FEATURE_NOMS DMO reporting
Mode of output for
165 OUTPUT_TYPE
dimensions
558 OVERLAP
559 OVERSCAN
446 OVERWRITE DMO reporting

-P-
Data Type Value
Number Data Type Name Index
Description String
Prepended
374 _PRINT_TO_FILE with _ to
avoid

341
Reporting Measurement Results

confusion
with Edit
window
constants
Prepended
with _ to
avoid
375 _PRINT_TO_PRINTER confusion
with Edit
window
constants
191 PART_NAME
"SQUARE"
Auto plane
519 PATTERN_TYPE 0 or
pattern
"RADIAL"
487 PERCENTAGE
Number of
73 PERM_HITS Perm 0 0 or more
(sample) hits
Dimension
170 PERP_PARALLEL_TYPE perindicular
parallel type
115 PINVEC_I Pin vector i
116 PINVEC_J Pin vector j
117 PINVEC_K Pin vector k
605 PIXEL_TOGGLE
Point info
186 POINT_INFO_HEADING
heading type
Toggle field
for deviation
380 POINTINFO_FILTER_DEVIATION filter state of
point info
commands
Number field
associated
POINTINFO_FILTER_ with deviation
381
DEVIATION_NUMBER filter state of
point info
commands

342
About Report Expressions

Toggle field
for interval
301 POINTINFO_FILTER_INTERVAL filter state of
point info
commands
Number field
associated
POINTINFO_FILTER_ with interval
302
INTERVAL_NUMBER filter state of
point info
commands
Toggle field
for outtol filter
382 POINTINFO_FILTER_OUTTOL state of point
info
commands
Toggle field
for worst filter
378 POINTINFO_FILTER_WORST state of point
info
commands
Number field
associated
POINTINFO_FILTER_ with worst
379
WORST_NUMBER filter state of
point info
commands
Polar vector
218 POLAR_VECTOR_COMPENSATION compensation
object
Positive
277 POS_REPORT_AXIS_X
reporting axis
Positive
278 POS_REPORT_AXIS_Y
reporting axis
Positive
279 POS_REPORT_AXIS_Z
reporting axis
462 POS_REPT_DISPLAY_OPTION
Positional
214 POSITIONAL_ACCURACY accuracy for
option probe

343
Reporting Measurement Results

object
786 PPAP_INDEX
Measurement
routine name
399 PPROG (used in a
database
query)
Dimension
175 PRECISION display
precision
377 PRINT_DELETE_RUNS
376 PRINT_DRAFTMODE
Probe
accuracy for
213 PROBE_ACCURACY
option probe
object
Probe comp
228 PROBE_COMP
(on/off) toggle
Probing mode
299 PROBING_MODE for option
probe
Dimension
174 PROFILE_FORM_TYPE profile form
type toggle
550 PROFILE_TYPE
521 PROGRAM_GAGE_FEAT_TYPE
522 PROGRAM_GAGE_TYPE
Punch vector
118 PUNCHVEC_I
i
Punch vector
119 PUNCHVEC_J
j
Punch vector
120 PUNCHVEC_K
k

-Q-
Data Type Value
Number Data Type Name Index
Description String

344
About Report Expressions

470 QUERY_SHOW_GRAPHIC_SETTINGS

-R-
Value
Number Data Type Name Data Type Description Index
String
Dimension 2D Distance
171 RADIUS_TYPE
radius type
196 READ_WRITE Read / Write toggle
46 READPOS_TYPE Read Position (yes / no)
ID of object being
3 REF_ID
referred to
Reference temperature
222 REF_TEMP
for temp comp object
412 REGR For SPC
Flag for iterative
142 REPIERCE_CAD
alignments
Extended sheet metal
383 REPORT_SURFVEC_I
vector for DCC Edge
Extended sheet metal
384 REPORT_SURFVEC_J
vector for DCC Edge
Extended sheet metal
385 REPORT_SURFVEC_K
vector for DCC Edge
121 REPORTVEC_I Report vector i
122 REPORTVEC_J Report vector j
123 REPORTVEC_K Report vector k
Retrolinear only on / off
188 RET_ONLY_TYPE
toggle
Return speed for option
216 RETURN_SPEED
probe object
File header revision
192 REVISION_NUMBER
number
Use relative measures
48 RMEAS_TYPE
(yes / no)
69 RMEASFEATID Name of rmeas feature
524 RMEASFEATIDX Referenced feature (X 0 Feature

345
Reporting Measurement Results

axis) label
Referenced feature (Y Feature
525 RMEASFEATIDY 0
axis) label
Referenced feature (Z Feature
526 RMEASFEATIDZ 0
axis) label
Ref id for a rotate
5 ROTATE_REF_ID feature of an iterative
alignment
158 ROTATION_TYPE Move rotary table type
286 ROW_ID
639 RPT_DIMENSION_TABLES

-S-
Data Type Value
Number Data Type Name Index
Description String
Save Align Save
151 SAVE_ALIGN_CAD_TO_PARTS
Type
92 SCAN_ACCELERATION Scan acceleration
Axis vector i - for
265 SCAN_AXISVEC_I boundary
conditions...
Axis vector j - for
266 SCAN_AXISVEC_J boundary
conditions...
Axis vector k - for
267 SCAN_AXISVEC_K boundary
conditions...
432 SCAN_BNDRY_TYPE
Number of
crossings allowed
274 SCAN_CROSS_TOTAL
in boundary
condition
259 SCAN_CUTPLANEVEC_I Cut plane vector i
260 SCAN_CUTPLANEVEC_J Cut plane vector j
261 SCAN_CUTPLANEVEC_K Cut plane vector k
217 SCAN_DENSITY Scan density for

346
About Report Expressions

option probe
object
Edge thickness for
276 SCAN_EDGE_THICK
edge scans
268 SCAN_ENDVEC_I End touch vector i
269 SCAN_ENDVEC_J End touch vector j
270 SCAN_ENDVEC_K End touch vector k
Unit direction
271 SCAN_INITDIR_I
vector i
Unit direction
272 SCAN_INITDIR_J
vector j
Unit direction
273 SCAN_INITDIR_K
vector k
Initial touch vector
262 SCAN_INITVEC_I
i
Initial touch vector
263 SCAN_INITVEC_J
j
Initial touch vector
264 SCAN_INITVEC_K
k
93 SCAN_OFFSET_FORCE Scan offset force
358 SCAN_TECHNIQUE Scan technique
Time increment for
275 SCAN_TIME_INCR
manual scans
Screen capture
540 SCREEN_CAPTURE_AUTO_TIME time (always or on
error)
Screen capture
auto type (which
536 SCREEN_CAPTURE_AUTO_TYPE gives more options
that basic screen
capture)
Screen capture
503 SCREEN_CAPTURE_QUALITY
image color depth
Screen capture
502 SCREEN_CAPTURE_SCALE
image size
535 SCREEN_CAPTURE_TYPE Screen capture

347
Reporting Measurement Results

type (can now do


Live Image View
as well as CAD)
Box or circular
57 SEARCHMODE_TYPE search mode for
hipoint feature
764 SECTION_INDEX
Sensor list for
225 SENSOR_LIST
temp comp object
File header serial
193 SERIAL_NUMBER
number
494 SHOW_COLUMN
Display details for
136 SHOW_DETAILS alignments and
scans
Dimension format
179 SHOW_HEADINGS
headings toggle
Display id for
135 SHOW_IDS alignments and
loops
414 SHOW_MORE_SPC_CALCS For SPC
723 SHOW_NOMS
728 SHOW_OPTIONS
Point info / Show
187 SHOW_POINT_INFO
point info
493 SHOW_ROW
402 SHOW_SPC_CALCS For SPC
763 SIMULT_EVAL
Point mode on dcc
235 SINGLE_POINT
scan object
Skip number of
145 SKIP_NUM
loop
Measure slot using
53 SLOT_MIN_MAX_TYPE 5 (NORM) or 6
(MINMAX) hits

348
About Report Expressions

Sets the column


slot number for a
297 SLOT_NUMBER
column load and
unload
563 SLOT_TYPE
Theoretical slot
vector i - See the
109 SLOTVEC_I
"Slot Vector Data
Type" note below.
Theoretical slot
vector j - See the
110 SLOTVEC_J
"Slot Vector Data
Type" note below.
Theoretical slot
vector k - See the
111 SLOTVEC_K
"Slot Vector Data
Type" note below.
Vector features /
43 SNAP_TYPE
Surface features
416 SOLID For SPC
403 SPEC_LIMITS For SPC
415 SPEC_OFFSET For SPC
Source expression
(assign,
134 SRC_EXPR subroutine, call
sub, basic script,
flow control)
Dimension format
181 STANDARD_DEVIATION
std dev toggle
Radian
98 START_ANG Start angle 0
value
466 START_LABEL
Start number for
143 START_NUM
loop
Calc type on/off
254 STAT_CALC_TYPE toggle for statistics
object
194 STAT_COUNT File header

349
Reporting Measurement Results

statistics count
Variable name
253 STAT_NAME_TYPE type for statistics
object
Used for toggle
fields that cannot
1 STATIC_TOGGLE
contain
expressions
Datasource for
391 STATS_DATASOURCE
statistics object
For stats
453 STATS_DB_TYPE command
database option
Stats directory for
248 STATS_DIR
statistics object
Stats type for
247 STATS_TYPE
statistics object
405 STDDEV For spc
195 SUB_NAME Subroutine name
690 SUMMARY_AXIS
781 SUMMARY_BONUS
684 SUMMARY_COLUMN_HDR
640 SUMMARY_DEV
685 SUMMARY_FEAT
779 SUMMARY_MAX
692 SUMMARY_MEAS
780 SUMMARY_MIN
778 SUMMARY_MINUSTOL
691 SUMMARY_NOMINAL
776 SUMMARY_OUTTOL
777 SUMMARY_PLUSTOL
689 SUMMARY_TBLHDR
484 SURFACE

350
About Report Expressions

112 SURFVEC_I Surface vector i


113 SURFVEC_J Surface vector j
114 SURFVEC_K Surface vector k
Surface vector i
546 SURFVEC_MEAS_I
meas
Surface vector j
547 SURFVEC_MEAS_J
meas
Surface vector k
548 SURFVEC_MEAS_K
meas

Slot Vector Data Type

Note that SLOTVEC_I, SLOTVEC_J, and SLOTVEC_K are enumerations. They only
function within the context of automation.

For an automation example using enumerations, you should use SLOTVEC_I,


SLOTVEC_J, and SLOTVEC_K as shown below:

FeatureCommand.PutData(LocSlotVector,FDATA_SLOT_VECTOR,FDATA
_MEAS,FDATA_PART,"",PLANE_TOP)
Command.PutText("0",MEAS_SLOTVEC_I,1)
Command.PutText("1",MEAS_SLOTVEC_J,1)
Command.PutText("0",MEAS_SLOTVEC_K,1)

If you're using pointers or variables directly in the Edit window via the PC-DMIS
expression language, you need to use TANGVEC_IJK or ANGVEC_IJK:

• TANGIJK gets the theoretical IJK slot vector.

You can also get the specific values:

o TANGI gets the I value.


o TANGJ gets the J value.
o TANGK gets the K value.

• ANGIJK gets the measured IJK slot vector.

You can also get the specific values:

o ANGI gets the I value.

351
Reporting Measurement Results

o ANGJ gets the J value.


o ANGK gets the K value.

For an expression example, to give variables V1 and V2 the theoretical and measured
IJK values of the a round slot, you can use the following:

ASSIGN/V1=SLTR.TANGIJK
ASSIGN/V2=SLTR.ANGIJK

-T-
Data Type Data Type
Number Index Value String
Name Description
345 T_VALUE T value on hits
572 TARG_A
590 TARG_EA
591 TARG_EH
589 TARG_ER
Target endpoint
516 TARG_EX
x component
Target endpoint
517 TARG_EY
y component
Target endpoint
518 TARG_EZ
z component
573 TARG_H
31 TARG_I Target i - vector
32 TARG_J Target j - vector
Target k -
33 TARG_K
vector
571 TARG_R
587 TARG_SA
588 TARG_SH
586 TARG_SR
Target
513 TARG_SX startpoint x
component

352
About Report Expressions

Target
514 TARG_SY startpoint y
component
Target
515 TARG_SZ startpoint z
component
Target x -
19 TARG_X
centroid
Target y -
20 TARG_Y
centroid
Target z -
21 TARG_Z
centroid
TARGET_BLO
557
B_TYPE
TARGET_COL Vision Target
282
OR Color
TARGET_DIRE
474
CTION
TARGET_EDG
520
E_ANGLE
TARGET_EDG
508
E_DENSITY
TARGET_EDG
712 E_EDGEDETE
CT
TARGET_EDG
538
E_EDGENUM
TARGET_EDG
537 E_EDGESELE
CT
TARGET_EDG
717
E_GRADIENT
TARGET_EDG
711
E_HEIGHT
TARGET_EDG
505
E_ILLUM
475 TARGET_EDG

353
Reporting Measurement Results

E_POLARITY
TARGET_EDG
504
E_SIZE
TARGET_EDG
507
E_STRENGTH
TARGET_EDG
506
E_TOL
TARGET_EDG
509
E_TYPE
TARGET_EDG
549 E_UNDERSCA
N
TARGET_EDG
710
E_WIDTH
TARGET_FILT
715
ER_AREA
TARGET_FILT
716 ER_AREA_SIZ
E
TARGET_FILT
713
ER_CLEAN
TARGET_FILT
714 ER_CLEAN_
STRENGTH
TARGET_FILT
561
ER_OUTLIER
TARGET_FILT
ER_OUTLIER_
562
DISTANCE_TH
RESHOLD
TARGET_FILT
ER_OUTLIER_
599
STD_DEV_TH
RESHOLD
TARGET_FOC
523
US
TARGET_SUR
722
FACE_

354
About Report Expressions

CROSSHAIR_
HEIGHT
TARGET_SUR
FACE_
722
CROSSHAIR_
HEIGHT
TARGET_SUR
499 FACE_DURATI
ON
TARGET_SUR
497
FACE_HEIGHT
TARGET_SUR
501
FACE_HIACC
TARGET_SUR
490
FACE_ILLUM
TARGET_SUR
500
FACE_MODE
TARGET_SUR
498
FACE_RANGE
TARGET_SUR
511
FACE_TYPE
TARGET_SUR
496
FACE_WIDTH
TARGET_TYP
564
E
Target slot
124 TARGSLOT_I
vector i
Target slot
125 TARGSLOT_J
vector j
Target slot
126 TARGSLOT_K
vector k
Current Part
532 TEMPP
temperature
Current X axis
529 TEMPX
temperature
Current Y axis
530 TEMPY
temperature

355
Reporting Measurement Results

Current Z axis
531 TEMPZ
temperature
Use text
TEXT_ANALSY analysis on
163
IS dimension (Yes
/ No)
TEXTANAL_LA
761
BEL_DEV
TEXTANAL_LA
758
BEL_MEAS_I
TEXTANAL_LA
759
BEL_MEAS_J
TEXTANAL_LA
760
BEL_MEAS_K
TEXTANAL_LA
755
BEL_MEAS_X
TEXTANAL_LA
756
BEL_MEAS_Y
TEXTANAL_LA
757
BEL_MEAS_Z
TEXTANAL_LA
762
BEL_MINMAX
566 THEO_A
For CMT
609 THEO_A2 characteristic
point 1
Theoretical
38 THEO_ANGLE
angle
720 THEO_AREA
555 THEO_DEPTH
Theoretical
34 THEO_DIAM
diameter
578 THEO_EA
579 THEO_EH
THEO_END_A Vision Circle
284
NG Feature

356
About Report Expressions

577 THEO_ER
Theoretical x -
13 THEO_EX
end point
Theoretical y -
14 THEO_EY
end point
Theoretical z -
15 THEO_EZ
end point
551 THEO_FLUSH
553 THEO_GAP
567 THEO_H
For CMT
610 THEO_H2 characteristic
point 1
Theoretical
37 THEO_HEIGHT
height
Hit point
16 THEO_I theoretical i - point number Numeric value
vector
Hit point
17 THEO_J theoretical j - point number Numeric value
vector
Hit point
18 THEO_K theoretical k - point number Numeric value
vector
THEO_LENGT Theoretical
36
H length
THEO_MINOR Theoretical
130
_AXIS minor access
THEO_PERIME
718
TER
565 THEO_R
For CMT
608 THEO_R2 characteristic
point 1
575 THEO_SA
576 THEO_SH

357
Reporting Measurement Results

574 THEO_SR
THEO_START_ Vision Circle
283
ANG Feature
Theoretical x -
10 THEO_SX
start point
Theoretical y -
11 THEO_SY
start point
Theoretical z -
12 THEO_SZ
start point
Theoretical
35 THEO_WIDTH
width
Hit point
7 THEO_X theoretical x - point number X-Coordinate
centroid
For CMT
393 THEO_X2 characteristic
point 1
Hit point
8 THEO_Y theoretical y - point number Y-Coordinate
centroid
For CMT
394 THEO_Y2 characteristic
point 1
Hit point
9 THEO_Z theoretical z - point number Z-Coordinate
centroid
For CMT
395 THEO_Z2 characteristic
point 1
Use theoretical
THEOBF_TYP values for best
49
E fit algorithm
(yes / no)
"THICKNESS_
NONE",
THICKNESS_T Theoretical or "THEO_
41 0
YPE actual thickness THICKNESS",
or "ACTL_
THICKNESS"

358
About Report Expressions

THICKNESS_T Theoretical or
594
YPE_EDGE actual thickness
Thinning
THINNING_TO
67 tolerance for
L
curves
488 THRESHOLD
450 TIME_ARG For SPC
For SPC:
401 TIME_FILTER filtering based
on time stamps
Tip shank
229 TIP_I vector i
component
Tip shank
230 TIP_J vector j
component
Tip shank
231 TIP_K vector k
component
418 TITLE For SPC
349 TOOL_DIAM Tool diameter
346 TOOL_X Tool x value
347 TOOL_Y Tool y value
348 TOOL_Z Tool z value
Dimension
169 TP_MODIFIER Position
modifier
This is because
TP_MODIFIER
and
TP_MODIFIER TP_MODIFIER
726
2 2 are used in
two different
groups in
summary mode.
For SPC:
TRACE_FILTE
400 filtering based
R
on trace fields

359
Reporting Measurement Results

TRACE_FILTE
451 For SPC
R_ARG
Trace field
257 TRACE_NAME
name
TRACE_VALU Trace field
258
E value
Trace
command
TRACE_VALU
473 character limit
E_LIMIT
for the value
field
Transfer
TRANSFER_DI
255 directory for
R
statistics object
Trigger force for
TRIGGER_FO
212 option probe
RCE
object
TRIGGERPLAN
469
E
TRIGGERTOLE
463
RANCE
TRIGGERTOLV
464
ALUE
TWO_D_THRE
131 2d or 3d
E_D_TYPE

-U-
Value
Number Data Type Name Data Type Description Index
String
Number of U points for
318 U_HITS
surface
417 U_L_BOUNDS For SPC
406 UCL_LCL For SPC
172 UNIT_TYPE Unit type (inch / mm)
Up force for option probe
211 UP_FORCE
object
127 UPDATEVEC_I Update vector i

360
About Report Expressions

128 UPDATEVEC_J Update vector j


129 UPDATEVEC_K Update vector k
431 USE_3DFILTER
Flag for iterative
139 USE_AXIS alignments and start TP
dimension
753 USE_AXIS2
Enables or disables
using the boundary offset
as a minimum distance
from the boundary (the
edge) where the hits are
968 USE_BOUNDARY_OFFSET YES/NO
automatically placed
during a Void Detection.
If set to NO, the tip's
radius value is the
minimum distance.
541 USE_HSSDAT
542 USE_STARTENDDELAY
281 USE_THEO BRN added 5/2/2002
Use pin vector or normal
44 USEPIN_TYPE
vector
738 USETWODEVIATIONS

-V-
Value
Number Data Type Name Data Type Description Index
String
Number of V points for
319 V_HITS
surface
363 VIDEO_GAIN
366 VIDEO_LASERLIGHT1
367 VIDEO_LASERLIGHT2
365 VIDEO_LEDLIGHT
370 VIDEO_LSEG
364 VIDEO_OFFSET

361
Reporting Measurement Results

371 VIDEO_XSEG
369 VIDEO_YEND
368 VIDEO_YORIGIN
372 VIDEO_YSEG
"YES" or
512 VOID_DETECT Turn off void detection 0
"NO"

-W-
Data Type Value
Number Data Type Description Index
Name String
322 WAVE_FILE Feature Locator Wave File
Weight value for Best Fit
137 WEIGHT
alignments
154 WORK_PLANE Workplane

-X-
Number Data Type Name Data Type Description Index Value String
146 X_OFFSET X Offset for loops

-Y-
Number Data Type Name Data Type Description Index Value String
147 Y_OFFSET Y Offset for loops

-Z-
Number Data Type Name Data Type Description Index Value String
148 Z_OFFSET Z Offset for loops
404 ZONES For SPC

Using a Type Index to Display Specific Data


Type indexes let you pull in very specific data into your report. For example, if you had a
cylinder feature with eight hits, you could use a type index to grab the second hit's
measured X value. To use a type index, simply append a colon and a number to the
expression to get that hit or that row of dimension data.

362
About Report Expressions

Type Indexes to Display Specific Data

To demonstrate how this works, if you typed:

=MEAS_X

PC-DMIS would not use a type index (the type index would default to 0) and PC-DMIS
would display the measured X value of the feature's center point.

But, if you typed:

=MEAS_X:1

PC-DMIS would display the measured X value of the first hit.

If you typed:

=MEAS_X:2

PC-DMIS would will retrieve the measured X value of the second hit.

Repeating Rows to Display all Data

Similar to type indexes, In the GridControlObject you can define a row as a "repeating
row". With repeating rows, the character "N" evaluates to the current repeat index of the
row being drawn. When you define a repeating row, you can also define a repeating row
expression that, when evaluated, determines how many times the row repeats.

So, if you wanted to display all of the measured X values for all hits in a feature, you
could define a single repeating row with the following expression:

=MEAS_X:N

You could then set the repeating row expression to "=N_HITS" to get the total number
of hits. PC-DMIS would continue to repeat the row with subsequent hit data until the
total number of hits was displayed.

Using a Prefix Number to Access Reference Feature Data


A report expression can take an optional prefix number inside curly brackets to indicate
from which reference command the data should be taken.

For example, if you create a label template for a Roundness dimension, and you want to
show the measured diameter on the label template, you could use this expression:

={1}MEAS_DIAM()

363
Reporting Measurement Results

Notice the {1}. This indicates that the data needs to come from the first reference
command (the feature) instead of the command for which the template is being created
(the dimension).

If there is more than one reference feature used, the number within the curly braces
represents the feature from which PC-DMIS will pull the information. For example, a
Distance dimension uses two features to compute the distance. Using {1} would pull
information from the first reference feature and {2} would pull it from the second
reference feature.

Predefined Constants
The reporting expression language also makes use of some predefined constants for
the type indices used with the DIMENSION_TABLES data type.

LINE1_SIZE_TABLE = 1
LINE2_POSITION_TABLE = 2
LINE3_POSITION_TABLE = 3
DATUM_SHIFT_TABLE = 4
SUMMARY_TABLE = 5
LINE2_ORIENTATION_TABLE = 7
LINE3_ORIENTATION_TABLE = 8
LINE2_BASIC_DIMENSION_TABLE = 9
LINE3_BASIC_DIMENSION_TABLE = 10
TRUE_POSITION_TABLE = 11
DIMENSION_TABLE = 12
DIMENSION_WITH_BONUS_TABLE = 13

NEWLINE

NEWLINE is used to add a carriage return to a text expression:

This expression,

="This is line 1" + " and this is line 2"

would appear as,

This is line 1 and this is line 2

364
About Report Expressions

on the report.

The expression,

="This is line 1" + NEWLINE + " and this is line 2"

would appears as,

This is line 1
and this is line 2

on the report.

N:

When using repeating rows in a grid, N evaluates to the current row count in the
repeating rows. This is useful when placing expressions that use a data type more than
once in a repeating row.

Below is a sample grid used to show hit values in a table. N is being used in the
expressions for the repeating row. When the expressions for the first instance of the
repeating row are evaluated, N will equal 1, and so the X, Y, and Z values of the first hit
will be shown. When the second row is added, N will equal 2, and so the X, Y, and Z
value of the second hit will be shown.

Expressions Used in Standard Templates


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.

365
Reporting Measurement Results

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.
366
About Report Expressions

• =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).

367
Reporting Measurement Results

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

Using PC-DMIS ActiveX Controls


This series of topics provides an example of how to set up the properties of various PC-
DMIS ActiveX controls and use them in a label template to display dimensional
information.

• Adding an ActiveX Control


• Passing Information to an ActiveX Control
• Some PC-DMIS ActiveX Controls

The topics focus on the unique ActiveX properties for each control.

Adding an ActiveX Control


You can add an ActiveX control to a label template in the Label Template Editor in two
ways:

• ActiveX Object from Object Bar - An ActiveX control can be added directly to
the label template by clicking on the ActiveX icon in the editor's Object Bar and
then defining the area where the control will populate. (See the "ActiveX Object"
topic.)
368
Using PC-DMIS ActiveX Controls

• ActiveX Object from GridControlObject - In a GridControlObject, double-click


on the object to select it, and then right-click to show the Grid Properties dialog
box, and set the Cell Type to ActiveX. This activates the Select button. Click
Select. (For information, see the "GridControlObject" topic.)

Regardless of what method you use, PC-DMIS displays the Insert ActiveX Control
dialog box.

Insert ActiveX Control dialog box

Select the desired control from the list and click OK.

This dialog box lists all the controls on your system, not just those controls
added by PC-DMIS. If you want to use a third party control in a label template, you
would add it in the same way.

Passing Information to an ActiveX Control


For all of the PC-DMIS ActiveX controls described here, the software passes
information into the control using the EventReportData event. PC-DMIS encapsulates
the specific dimensional information into an object called ReportData (see the
"ReportData Object" topic in the PC-DMIS 2020 R1 Object Library documentation for
additional information ). For example, if you look at the Rule Tree Editor for the
TextOnly.rtp report template, you will find for the Dimension Location item that one of
the rules is:

369
Reporting Measurement Results

Use Template "legacy_dimension.lbl"

The Legacy_dimension.lbl label template receives the dimensional information about


the location dimension via the ReportData object. The information is now in the label but
it has not yet been passed to the ActiveX control.

To understand how this information gets passed:

1. Open the legacy_dimension.lbl label template in the Label Template Editor. You
will see that it contains a GridControlObject named ActiveX12.
2. Right-click to display the Properties dialog box for the object.
3. Double-click on one of the cells in this grid control to put it in edit mode.
4. Click the cell in the lower right corner. This cell uses the Dimension Report
Linear control. Notice that the Properties dialog box has four categories of
properties (Standard, Advanced, Events, ActiveX). Normally, objects only have
three categories (Standard, Advanced, Events). This fourth category, ActiveX,
is unique to ActiveX controls and is the area we will be concentrating on in the
following sections.
5. Expand the Events section.
6. Access the EventReportData property. The VBA Mini Editor appears. Notice
that the editor contains this line of code:

This.X.EventReportData ReportData

This code is the mechanism that passes ReportData (the dimensional information) to
the ActiveX control. Therefore, whenever you add an ActiveX control to a label
template, you will need to set the EventReportData property to do the same thing by
using that line of code.

Some PC-DMIS ActiveX Controls


The following sections describe some PC-DMIS reporting ActiveX controls and their
properties. Note that the DimAnalysisActiveX Control is not discussed here. Although it
appears in the ActiveX list, it is used internally by the Analysis object in the Label
Template Editor.

370
Using PC-DMIS ActiveX Controls

BFAnalysisActiveX

Property Description Example


tbd [defaults to 65280
AfterColor The color of the last bar.
(Green)]
tbd [defaults to 255
BeforeColor The color of the first bar.
(Blue)]
The number of features shown on
NumberFeatures tbd
the X axis.

AfterColor and BeforeColor take long values representing a color.

They use the following formula:

(Red * 256 * 256) + (Green * 256) + Blue.

So Red would be 16711680; that is (255 * 256 * 256) + (0 * 256) + 0; Green would
be 65280; that is (0 * 256 * 256) + (255 * 256) + 0; Blue would be 255; that is, (0 *
256 * 256) + (0 * 256) + 255.

Example Label Template: BFANALYSISACTIVE1 in Best_Fit_Analysis.lbl.

371
Reporting Measurement Results

Dimension Report Linear

Property Description Example


See "Expressions Used
in Standard Templates"
DeviationNominalPercent =DEVPERCENT_NOM:N
for a description of the
example expression.
See "Expressions Used
in Standard Templates"
DeviationPercent =DIM_RPT_DEVPERCENT:N
for a description of the
example expression.
See "Expressions Used
in Standard Templates"
DeviationPercent2 =DEVPERCENT2:N
for a description of the
example expression.
See "Expressions Used
in Standard Templates"
Is Bilateral =DIM_RPT_ISBILATERAL:N
for a description of the
example expression.
See "Expressions Used
in Standard Templates"
UseTwoDeviations: =USETWODEVIATIONS:N
for a description of the
example expression.

Example Label Template: Bottom right cell in Legacy_Dimension.lbl.

372
Using PC-DMIS ActiveX Controls

Dimension Report Linear2

Property Description Example


See "Expressions Used in Standard
Deviation: Templates" for a description of the example =DIM_DEVIATION:N
expression.
See "Expressions Used in Standard
Negative
Templates" for a description of the example =F_PLUS_TOL:N
Tolerance:
expression.
See "Expressions Used in Standard
Positive
Templates" for a description of the example =F_MINUS_TOL:N
Tolerance:
expression.

Example Label Template: Not currently used in any standard label template.

Dimension Report Radial

Property Description Example


See "Expressions Used in
Cylindrical Standard Templates" for a
=DIM_RPT_DEVPERCENT:101
Deviation description of the example
expression.
See "Expressions Used in
Cylindrical
Standard Templates" for a
Deviation =DEVIATION_ANGLE:101
description of the example
Angle:
expression.

373
Reporting Measurement Results

Example Label Template: Bottom right cell in


Legacy_Dimension_True_Position.lbl.

FeatureAnalysisActiveX

There are no properties to set up for this control. It uses the data passed to it in
ReportData.

Example Label Template: FEATUREANALYSISA1 in Feature.lbl.

DataFileFormatControl

Property Description Example


The .dat file (logo.dat,
elogo.dat, or header.dat) to
If you typed logo.dat, PC-DMIS would
interpret.
interpret the keywords inside that .dat
DataFileName file displaying the specified bitmap,
If you use a .dat file outside
date, time, and so forth according to
of the PC-DMIS installation
the .dat file keywords in the file.
directory, be sure to include
the full path to the file.

Example Label Template: None. See the "Reporting Using .DAT File Keywords"
topic.

Tutorial - Using Scripting to Enhance


your Report
This tutorial demonstrates some of the capability available in PC-DMIS Reporting when
you couple it with the power of scripting.

This tutorial will create a report template that displays a CADOnly type report, except
that if the dimension is in-tolerance, a label template similar to Reference_ID.lbl is used.
If it is out-of-tolerance, the Legacy_Dimension_CAD.lbl label template is used.

374
Tutorial - Using Scripting to Enhance your Report

Additionally, the Reference_ID.lbl-like label will use the dimension color for its
background color.

A Sample Out-of-Tolerance Feature

A Sample In-Tolerance Feature

This tutorial is not a complete solution since it will not cover needed
modifications to labels used by Feature Control Frame (FCF) dimensions. For this
to be a complete solution you may want to perform similar steps to FCF_Label.lbl
so that your FCF dimensions follow the same pattern.

Before you start the tutorial, you may want to review the "Summary of Tutorial Steps"
and "Things to Know" topics below.

Summary of Tutorial Steps


1. Copy CADONLY.RTP to CADONLYREF_ID.RTP.
CADONLYREF_ID.RTP will be the name of your new report template.
2. Copy REFERENCE_ID.LBL to REFERENCE_ID_COLOR.LBL.
REFERENCE_ID_COLOR.LBL will be your new label template used for in-
tolerance dimensions.
3. Add VB Script to REFERENCE_ID_COLOR.LBL.
Using the Label Template Editor, you will add VB script code to the new label

375
Reporting Measurement Results

template, REFERENCE_ID_COLOR.LBL, to set the background color based on


the dimension color.
4. Import the CAD2.RUL rules into CADONLYREF_ID.RTP.
In this step, you will import rules contained in the .RUL file into your new report
template, CADONLYREF_ID.RTP. The .RUL file contains the set of rules used
by the CAD portion of the TextAndCAD report, and it uses REFERENCE_ID.LBL
to display the dimension. You will modify rules that uses REFERENCE_ID.LBL to
use new rules and the new label template, REFERENCE_ID_COLOR.LBL.
5. Add VB Script Code to CADONLYREF_ID.RTP
Using the Report Template Editor, you will add script code to
CADONLYREF_ID.RTP at each place in the rule tree that references
REFERENCE_ID.LBL to check to see if the dimension is in tolerance. If it is in
tolerance, the code will cause it to use REFERENCE_ID_COLOR.LBL. If it is not,
the code will cause it to use LEGACY_DIMENSION_CAD.LBL.

If you are creating a new FCF_LABEL.LBL, e.g.


FCF_LABEL_COLOR.LBL, at this time you would also change the Feature
Control Frame rule to use FCF_LABEL_COLOR.LBL instead of
FCF_LABEL.LBL if it is in-tolerance and use another label, like LINE2.LBL, if
it is out-of-tolerance.

6. Modify the Rules to Use the VB Script Code for Remaining Dimensions.
At this point the new rules will only be established for Dimension Location. In this
step you will use the Copy and Paste functions inside the Rule Tree Editor so
that other dimension types can use the same rules.
7. Test CADONLYREF_ID.RTP in the Report Window.
In this step you select the CADONLYREF_ID.RTP template and test it inside the
Report window. By the end of this tutorial you will have a report template that
causes in-tolerance dimensions to only display the feature name with a
background dimension color that matches a color from the dimension color key at
the bottom of the page. Out-of-tolerance dimensions will use the
LEGACY_DMENSION_CAD.LBL label.

Things to Know
• The "ReportData Object" topic in the PC-DMIS 2020 R1 Object Library
documentation provides a description of methods for this object. This example
uses several ReportData methods.

376
Tutorial - Using Scripting to Enhance your Report

• To get Dtype information, right click on a dimension in the Edit Window. At the
bottom of the displayed menu is the item "Change Pop-up Display”. Select that
and then select "Data Type Information”. Now when you hover the cursor over an
item in the Edit Window, a help tip displays Dtype information. For example, if
you hover over a OUTTOL value, the tooltip description displays "Out tol
(DIM_OUTTOL – 344), 0”. The Dtype is DIM_OUTTOL and the Dtype number is
344. This example uses the Dtype numbers. Future versions of PC-DMIS will
also allow the use of the Dtype itself.
• The VBS Mini-Editor accepts the MsgBox statement. You may want to use this
statement to help debug your script. Information that you display via the MsgBox
statement will be displayed during report generation.
• The VBS Mini-Editor is a "mini" editor. If you are familiar with Visual Basic /
Visual Studio, note that this editor and the BASIC language used do not have all
of the capabilities of the larger BASIC systems.

Step 1: Copy CADONLY.RTP to CADONLYREF_ID.RTP


In this step, CADONLYREF_ID.RTP will be the name of your new report template.

Inside Windows Explorer, create a copy of the CADONLY.RTP file in your Reporting
sub-directory, and rename the copy to CADONLYREF_ID.RTP.

You can find the Reporting folder at this location. This folder contains all the templates
that the Report window uses:

C:\Users\Public\Documents\Hexagon\PC-DMIS\<version>\Reporting

<version> represents the PC-DMIS version. If you want to customize existing


templates or create new ones, do so in that directory.

If you need to restore any modified template to its factory settings, you can copy it
from the DefaultReportingTemplateBackup directory located within the PC-DMIS
installation directory and paste it the above Reporting directory.

Do not modify the templates in the DefaultReportingTemplateBackup directory.

Step 2: Copy REFERENCE_ID.LBL to


REFERENCE_ID_COLOR.LBL
In this step, REFERENCE_ID_COLOR.LBL will be your new label template used for in-
tolerance dimensions.

377
Reporting Measurement Results

From the same Reporting subdirectory, create a copy of REFERENCE_ID.LBL, and


rename the copy to REFERENCE_ID_COLOR.LBL.

Step 3: Add VB Script to REFERENCE_ID_COLOR.LBL


In this step, using the Label Template Editor, you will add VB script code to the new
label template, REFERENCE_ID_COLOR.LBL, to set the background color based on
the dimension color.

1. Select File | Reporting | Edit | Label Template, and open


REFERENCE_ID_COLOR.LBL. The label opens. It contains a GridControlObject
with one row and one column. If you double-click on the cell, you will see an
expression inside which reads:

=REF_ID:1

This means the label will display the ID of the reference feature.

2. Right-click on the editor to display the Properties dialog box.


3. Select GridControlObject1 from the list of objects.
4. In the Properties dialog box, expand Events.
5. Click [None] to the right of the EventReportData property. The VBS Mini-Editor
appears. You may need to expand the VBS Mini Editor to be wider so that you
can see the entire Sub statement toward the top.

You can see that the ReportData object is passed in. This is where PC-
DMIS extract information about passed in dimensions. For additional information
on the ReportData object, see the "ReportData Object" topic in the PC-DMIS 2020
R1 Object Library documentation. Also, if you need to reference the
GridControlObject, you can use "This" as a shortcut to the object.

6. Insert this code into the VBS Mini-Editor:

Dim Count As Integer


Dim I As Integer
Dim MaxIndex As Integer
Dim MaxDev As Double
Dim CurrentDev As Variant
Dim Dev As Variant

378
Tutorial - Using Scripting to Enhance your Report

Dim PTol As Variant


Dim MTol As Variant
Dim iReturn As Boolean
' Initialize Max deviation and Max Index
MaxDev = 0.0
MaxIndex = 1
' Get the number of axes for this dimension
' 132 is the Dtype AXIS
Count = ReportData.GetCount(132)
' Loop through to find the largest deviation
' When the loop is complete, MaxIndex is the index to the
' largest deviation
For I = 1 to Count
' 340 is the Dtype DIM_DEVIATION
CurrentDev = ABS(ReportData.GetValue(340, I))
If CurrentDev > MaxDev Then
MaxDev = CurrentDev
MaxIndex = I
End If
Next I
' Using MaxIndex, acquire that axes deviation, + Tol and -
Tol
' 167 is Dtype F_PLUS_TOL; 168 is Dtype F_MINUS_TOL
Dev = ReportData.GetValue(340, MaxIndex)
PTol = ReportData.GetValue(167, MaxIndex)
MTol = ReportData.GetValue(168, MaxIndex)
' Use this information to adjust the background color of the
grid cell
iReturn = This.SetCellBackgroundColor(0, 0,
ReportData.GetTolColor(Dev,PTol,MTol))

Explanation of Code:

379
Reporting Measurement Results

This code uses the numeric values for Dtypes. The variable MaxDev is
initialized to zero and when a larger deviation is found, it is placed in MaxDev.
After the For/Next loop finishes, MaxDev holds the maximum deviation for this
dimension and MaxIndex holds the index to that axis. The statement
ReportData.GetCount gets the number of axes for this dimension. The For/Next
loop loops through each axis.

ReportData.GetTolColor gets the tolerance color for the specified deviation and
tolerance values. We use MaxIndex to get the deviation and tolerance values for
the axis with the largest deviation. GetTolColor returns the color values as a Long.

We use "This" to reference the GridControlObject1 object.


SetCellBackgroundColor sets the background color for a specific cell. Arguments
1 and 2 are the cell’s row and column numbers. The first cell in a row and column
of a grid control is row / column zero. The third argument is the color that you wish
to be the background color for this cell. It is also a Long value.

7. Once you have added the code, click OK. The Mini-Editor will check for any
syntax errors. If you have an error in your code, a message is displayed at this
time. If there aren't any errors, the VBS Mini-Editor closes.
8. Select File | Save to saves your new copy of REFERENCE_ID_COLOR.LBL.
9. Select File | Close. This closes the Label Template Editor.

Step 4: Import the CAD2.RUL rules into


CADONLYREF_ID.RTP
In this step, you will import rules contained in the .RUL file into your new report
template, CADONLYREF_ID.RTP. The .RUL file contains the set of rules used by the
CAD portion of the TextAndCAD report, and it uses REFERENCE_ID.LBL to display the
dimension. You will modify rules that uses REFERENCE_ID.LBL to use new rules and
the new label template, REFERENCE_ID_COLOR.LBL.

1. Select File | Reporting | Edit | Report Template, and open


CADONLYREF_ID.RTP.
2. Display the Properties dialog box.
3. Select the CadReportObject1 object from the list of objects.

380
Tutorial - Using Scripting to Enhance your Report

4. In the Properties dialog box, expand the Standard list and click Rules next to
the Rule Tree property. The Rule Tree Editor opens.
5. Click the Import button, select CAD2.RUL, and then click Open. Your report
template now includes the same rules that are used in the CAD portion of the
TextAndCAD report template.
6. In the Rule Tree Editor, click on Dimension Location, and select the rule that
says Use Template "Reference_ID.lbl".
7. Click Edit. The Edit Rule dialog box appears.
8. Change the Label Name from "Reference_ID.lbl" to "Reference_ID_Color.lbl".
You can do this by typing or by clicking the ... button and navigating to this file.

Step 5: Add VB Script Code to CADONLYREF_ID.RTP


In this step, using the Report Template Editor, you will add script code to
CADONLYREF_ID.RTP at each place in the rule tree that references
REFERENCE_ID.LBL to check to see if the dimension is in tolerance. If it is in
tolerance, the code will cause it to use REFERENCE_ID_COLOR.LBL. If it is not, the
code will cause it to use LEGACY_DIMENSION_CAD.LBL.

1. While still In the Edit Rule dialog box, click Use Additional Expression or
Script, select the Script option, and then click the Edit button. The VBS Mini-
Editor appears.
2. Insert the following code into the VBS Mini-Editor:

Dim Count As Integer


Dim CurrentOutTol As Variant
Dim I As Integer
' iRetVal = 1 if In-Tolerance; iRetVal = 0 if Out-of-
Tolerance
iRetVal = 1
' 132 = Dtype AXIS
Count = ReportData.GetCount(132)
' Loop through each axis to see if OutTol is non-zero
For I = 1 to Count
' 344 = Dtype DIM_OUTTOL
CurrentOutTol = ReportData.GetValue(344, I)
If CurrentOutTol > 0 Then
iRetVal = 0
Exit For

381
Reporting Measurement Results

End If
Next I

Explanation of Code:

This code uses the numeric values for Dtypes. It loops through each axis
of this dimension and looks at the out-of-tolerance value. The return value is
initialized to 1 (True). If a non-zero out-of-tolerance value is found, it sets the
return value to 0 (False).

3. Once you have added the code, click OK. The Mini-Editor will check for any
syntax errors. If you have an error in your code, a message is displayed at this
time. If there aren't any errors, the VBS Mini-Editor closes.
4. Click the Add button to define a new rule. The Edit Rule dialog box appears.
5. In the Label Name box, select or type LEGACY_DIMENSION_CAD.LBL.
6. Again, click Use Additional Expression or Script, select the Script option, and
then click the Edit button. The VBS Mini-Editor appears.
7. In the VBS Mini-Editor, insert the following code:

Dim Count As Integer


Dim CurrentOutTol As Variant
Dim I As Integer
' iRetVal = 1 if In-Tolerance; iRetVal = 0 if Out-of-
Tolerance
iRetVal = 0
' 132 = Dtype AXIS
Count = ReportData.GetCount(132)
' Loop through each axis to see if OutTol is non-zero
For I = 1 to Count
' 344 = Dtype DIM_OUTTOL
CurrentOutTol = ReportData.GetValue(344, I)
If CurrentOutTol > 0 Then
iRetVal = 1
Exit For
End If
Next I

382
Tutorial - Using Scripting to Enhance your Report

Explanation of Code:

This code is identical to the previous code, except that the return values
are reversed. The return value is initialized to 0 (False). If a non-zero out-of-
tolerance value is found, it sets the return value to 1 (True).

8. Once you have added the code, click OK. The VBS Mini-Editor will check for
any syntax errors. If you have an error in your code, a message is displayed at
this time. If there aren't any errors, the VBS Mini-Editor closes.
9. Click OK to close the Edit Rule dialog box.

Step 6: Modify the Rules to Use the VB Script Code for


Remaining Dimensions
In this step you will use the Copy and Paste functions inside the Rule Tree Editor so
that the other legacy dimension types can use the same rules.

At this point, the Rule Tree Editor is open and the Dimension Location is selected.

1. Click and highlight both rules for the selected dimension.


2. Click the Copy button.
3. Go through each legacy dimension in the rule tree, and check to see if it has this
rule:

Use Template "Reference_Id.lbl"


4. If it does, select the rule, and click the Paste button. This adds the copied rules
to the selected dimension type.
5. Once you have modified all the dimension types to use the new rules, click OK to
close the Rule Tree Editor.
6. Select File | Save to saves your new copy of CADONLYREF_ID.RTP.
7. Select File | Close. This closes the Label Template Editor.

Step 7: Test CADONLYREF_ID.RTP in the Report


Window
In this step you select the CADONLYREF_ID.RTP template and test it inside the Report
window.

383
Reporting Measurement Results

1. Ensure that your measurement routine uses legacy dimensions.


2. Execute your measurement routine.
3. Display the Report Window by selecting View | Report Window.

4. From the Reporting toolbar, click on the Template Selection Dialog icon .
The Report Templates dialog box appears.
5. Click the Add button.
6. From the Open dialog box, select CADONLYREF_ID.RTP, and click Open. The
report template is added into the Report Templates dialog box.
7. From the Report Templates dialog box, select CADONLYREF_ID.RTP again,
and click Open.
8. PC-DMIS loads the report template. The Report window will contain a report of
your measurement routine results using the newly created
CADONLYREF_ID.RTP report template.

Notice that in-tolerance dimensions only display the feature name and that the
background color is the dimension color and matches a color on the dimension color
key at the bottom of the page. Out-of-tolerance dimensions use the
LEGACY_DIMENSION_CAD.LBL label.

The following screen capture demonstrates what such a report might look like:

Sample Report Showing In-Tolerance Features (CIR1 and CIR2) and Out-of-
Tolerance Features (CIR3 and CIR4)

Congratulations, you've completed the tutorial!


384

You might also like