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.



  • Parameters

Any secsObject - A 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.

  • Returns

Dataset A dataset representing a SECS message.

  • Scope

Gateway, Vision Client, Perspective Session

Code Examples
Code Snippet
# Receive a SECS message. Example assumes you have ha valid transaction ID. 
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",

system secsgem toDataSet, secsgem.toDataSet