Skip to main content
Version: 7.9


This function is used in Python Scripting.


Converts a SECS message data structure, as returned by the system.secsgem.getResponse function, into a dataset and returns it.

Client Permission Restrictions

This scripting function has no Client Permission restrictions.




AnysecsObjectA Python object, such as Sequence or a Dictionary, representing a SECS message to convert to a dataset. More information on how to format the Python object can be found on the SECS Definition Language (SDL) File page.


DataSet - A DataSet representing a SECS message.


Gateway, Designer, Client

Code Examples

Code Snippet
# Receive a SECS message.
object = system.secsgem.getResponse(transactionID, "myEquipment", 2)

# Turn the message into a dataset.
dataset = system.secsgem.toDataSet(object)

# Assuming this script was called from a component script, and a Table component was in the same container as the component that called this script, we could pass
# the dataset to the Data property.
event.source.parent.getComponent('Table').data = dataset
Code Snippet - Manually Making the Message
"doc":"nonexistent function",
"doc":"FirstItem, my first nonsense item",
"doc":"SecondItem, the other nonsense item",