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:
A Python Script Designer control cannot be added or changed by a user that does not have specific rights to perform these actions as set in the Add and Edit Python Scripts setting under Miscellaneous on the Roles tab of the System Administration module.
When you right-click a dashboard that is in design/edit mode, and select Display changes (no save) from the menu, this dashboard control saves the Python script.
If the Python Script Designer control displays an HTML page, that page may not display correctly when you use the Send To menus.
Contents [Hide] |
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.
The Python Script Designer can be added to a dashboard with the same methods used for adding dashboard controls.
A dialog opens asking if you would like to create a new Python design or use an existing design.
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.
There are two ways to change the location of the control when it is open in design/edit mode on the dashboard:
Click and hold the control tab (circled in red for this example showing a Data Table) while dragging (moving) the control to a new location on the dashboard window.
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
Use the Z-Order property to specify the order in which the designer displays on the dashboard in relation to dashboard controls.
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.
Use this to debug your Python design in GainSeeker.
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:
Right-clicking the dashboard, pointing to Send To, and choosing any option
Clicking the Send To button on the Toolbar and choosing any option
Clicking the Desktop menu, pointing to Send To, and choosing any option
Displaying a Slideshow
Using GainSeeker Publish to automatically publish or e-mail GainSeeker Dashboards or Desktops
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.