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 App settings permanently and restore them after restarting the App. Access App 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 Apps.

How-to:

Using shared environments

Keywords:

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

Workspace

Template:

Workspace Editor Tools

Description:

Create an App specific workspace.

How-to:

Adding worksppaces to Apps

Keywords:

addon, add-on, app, 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 Apps.

How-to:

Testing Apps

Keywords:

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

Project keywords and CSV export/import

Template:

PythonApiExamples.addon

Description:

Read and write project keywords from/to CSV file.

How-to:

Project keywords handling

Example Documentation:

CSV import/export example

Keywords:

read, write, access, get, set, project keywords, export, import, csv

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