Search

User Manual

GETTING STARTED


MODULES AND PLATFORM


APPENDIX


TUTORIALS & HELPFUL TRICKS


STRATEGIC PARTNER LINKS

Sepasoft - MES Modules
Cirrus Link - MQTT Modules

RESOURCES

Inductive University
Ignition Demo Project
Knowledge Base Articles
Forum
IA Support
SDK Documentation
SDK Examples

ALL USER MANUAL VERSIONS

Ignition 8.1
Ignition 7.9
Ignition 7.8

Deprecated Pages

Employees

Sign In

Skip to end of metadata
Go to start of metadata

This function is used in Python Scripting.

Description

This function converts from a normal DataSet to a PyDataSet, which is a wrapper class which makes working with datasets more Python-esque. For more information on Datasets and PyDatasets, see the Datasets page. 

Client Permission Restrictions

This scripting function has no Client Permission restrictions.

Syntax

system.dataset.toPyDataSet(dataset)

  • Parameters

Dataset dataset - A DataSet object to convert into a PyDataSet.

  • Returns

PyDataSet - The newly created PyDataSet.

  • Scope

Gateway, Vision Client, Perspective Session

Code Examples
Code Snippet
# This example script would be added to a button that is in the same container as the table you are working with. 
# It grabs the data of the Table component, and adds up the values in the column named "Value", displaying the result to the user.
 
# Get a Table component's data
table = event.source.parent.getComponent("Table")
data = system.dataset.toPyDataSet(table.data)
 
# Loop through the data, summing the Value column
value = 0.0
for row in data:
   value += row["Value"]
 
# Show the user the sum of the Value column
system.gui.messageBox("The value is: %f" % value)
Keywords

system dataset toPyDataSet, dataset.toPyDataSet

  • No labels