Python Script Designer dashboard control

The Python Script Designer dashboard control lets you design a Python script that can give you greater functionality in GainSeeker. This control can be added to and then accessed on a dashboard. It has ready-made actions that help you write your Python script. For example, you can automatically generate script for DMS and SPC retrievals, SQL queries, displaying websites, data input forms, and more.

Python is an accessible scripting language that allows you to automate customized data analytics in a readable syntax. People who are familiar working with other programming or scripting languages are encouraged to explore the use of Python with GainSeeker.

See the Python website for more information about this scripting language.

Notes:

 

Contents  [Hide]

 

One example of how a Python Script Designer control might display on a dashboard

This example is only one example of how a Python Script Designer might look on a dashboard window in run mode. You can see an example of how to code this using Python script in GainSeeker.

Adding a Python Script Designer to a dashboard

The Python Script Designer can be added to a dashboard with the same methods used for adding dashboard controls.

  1. Click the Python Script Designer button on the dashboard controls toolbar on a dashboard window that is open in design/edit mode

A dialog opens asking if you would like to create a new Python design or use an existing design.

  1. Click New to create a new Python design.

  1. Provide a unique name for the new design in the dialog that opens.

The Python Script Designer opens on the dashboard window. The Properties dialog displays properties specific to the designer as long as the designer is the selected element on the dashboard window. See Python Script Designer Properties below in this topic.

  1. Click Edit Script to edit the script.

    For more information on editing scripts, see Using the Python Script Editor.

Moving and selecting the dashboard control

There are two ways to change the location of the control when it is open in design/edit mode on the dashboard:

The Python Script Designer properties options

Some of the properties may be familiar in usage and not usually require additional explanation. The properties specifically designed for GainSeeker users are featured in this topic.

The Python-specific properties only display when the dashboard control is selected when it is in design mode. See Moving and selecting the control

Setting the Z-Order

Use the Z-Order property to specify the order in which the designer displays on the dashboard in relation to dashboard controls.

PythonScript

Use the PythonScript property to open the Python Script Editor that can be used to associate a saved script with the dashboard control. It can also be used to perform other actions on a script.

(Debug)

Use this to debug your Python design in GainSeeker.

Anchor, Dock

Timeout period for Python Script Designer control

When a dashboard includes a Python Script Designer control, some actions will delay up to 10 seconds (or another time period you specify) for the Python script to finish executing. These include:

The default timeout period is 10 seconds, but you can change this for any workstation. To do so, use a text editor such as Windows NotePad to open the gscharts.settings file in the LocalAppData\Hertzler_Systems\ folder (such as C:\Users\user_name\AppData\Local\Hertzler_Systems\). Find the dashboardcapturepythonscripttimeout property and change it from 10 to the number of seconds you want to use for the timeout period on this workstation, then save the updated file.

See also: