Scripted checks

Note

This section assumes that you are familiar with the basic concept of Scripted elements. If not, take a look at the Introduction and Scripted actuals sections.

Introduction

Scripted checks are a specialization of scripted elements to realize customized inspections in the GOM Software. Use checks if you want to display the deviation of certain properties of existing elements.

Writing a scripted check

The script structure to create a scripted check is the same as for Scripted actuals. However, there are some specialities:

Useful dialog widgets

In most cases, you need to ask the user for the element to check, check naming or tolerance inputs. To this end, you can use the Selection element, Element name, Unit and Tolerances widgets:

“Special” parameters

For a successful integration with the native checks, unit and tolerance need to be set to the returned params.

  params['tolerance']    = DIALOG.tolerances.value
  params['unit']         = DIALOG.unit.value
  params['abbreviation'] = 'ScrSca'

Furthermore, checks shall be assigned an abbreviation. This is the short form you’ll see in the 3D view labels of the check, or in the result table.

See also

Detailed description of the Scripted element API.

Types of scripted checks

Currently, three types of scripted checks are supported. The Python API Examples add-on provides examples for all three. Click on the respective links to get to the example documentation.