Scripting solutions

Abstract: Starting with a blank editor window is always hard. Therefore we have collected a set of solutions for common scripting tasks.

Scripted elements

Template:

PythonApiExamples.addon

Description:

Interactive creation of a geometrical element in an application specific way.

How-to:

Scripted elements

Example Documentation:

scripted_actuals

API Documentation:

Scripted Elements API

Keywords:

element, interactive, dialog, input, point, function, parameters, calculation

Scripted checks

Template:

PythonApiExamples.addon

Description:

Interactive creation of a geometrical element in an application specific way.

How-to:

Scripted checks

Example Documentation:

scripted_checks

API Documentation:

Scripted Elements API

Keywords:

scalar, curve, surface, inspection, check, comparison, tolerance

Stages

Description:

Access a set (ZEISS INSPECT) or sequence (ZEISS INSPECT Correlate) of actual data.

How-to:

Working with stages

Keywords:

set, samples, series, sequence, correlate

Dialog

Description:

Create a dialog window and the required Python code.

How-to:

User-defined dialogs

Keywords:

dialog, gui, graphical user interface, widgets, window, input, output, display

Element selection

Description:

Select elements from the Explorer.

How-to:

Selecting elements in scripts

Keywords:

element, selection, choice, choose, search, find

Settings

Template:

SettingsAPIExample.addon

Description:

Save Add-on settings permanently and restore them after restarting the Add-on. Access Add-on settings from ZEISS INSPECT preferences dialog.

API Documentation:

gom.api.settings

Keywords:

settings, configuration, state, save, store, restore, load, retain, persistent

Shared script environment

Description:

Sharing code and data between Add-ons.

How-to:

Using shared environments

Keywords:

addon, add-on, module, modular, package, class, function, method, code, data, import, reuse, re-use, use, call, execute, interaction

Workspace

Template:

Workspace Editor Tools

Description:

Create an Add-on specific workspace.

How-to:

Adding worksppaces to Add-ons

Keywords:

addon, add-on, toolbar, menu, tab, working area, workarea, workspace

File system access

Description:

Access folders and files from scripts.

How-to:

How Do I Select and Filter Files in Python Scripts

Keywords:

file, folder, directory, path, extension, disk, file system, file browser, file access

Element data interface

Template:

PythonApiExamples.addon

Description:

Access internal data element data structures, e.g. arrays of coordinates.

How-to:

Element data interfaces

Keywords:

element, data structures, coordinate, voxel, vector, array, matrices, matrix, numpy

Test framework

Template:

PythonApiExamples.addon

Description:

Implement code tests for Add-ons.

How-to:

Testing add-ons

Keywords:

test, testing, unit testing, test automation, add-ons, addons

Project keywords

Template:

PythonApiExamples.addon

Description:

Read and write project keywords.

How-to:

Project keywords handling

Keywords:

read, write, access, get, set, project keywords

Element filter

Description:

Filter elements by attributes.

How-to:

FAQ: How do I filter nominal, actual or inspection elements?

Keywords:

elements, attributes, properties, key, value, filter