Hello, Ignition 8.1
I am trying to read recipe data from an SQL database and load it back into a custom property UDT structure. I have the read from database working, and I can write the individual values to the screen components, but I am missing how to write it to UDT custom properties.
RecipeID = event.source.parent.getComponent('DropdownName').selectedValue
data = system.db.runNamedQuery("RecipeRead" , {"RecipeNumber":RecipeID})
#'event.source.parent.parent.RecipeParameters.Name',
#'event.source.parent.parent.RecipeParameters.Description',
#'event.source.parent.parent.RecipeParameters.LaminatorLineSpeed',
#'event.source.parent.parent.RecipeParameters.Note1',
#'event.source.parent.parent.RecipeParameters.Note2',
#'event.source.parent.parent.RecipeParameters.Note3',
#values = [row[col] for row in system.dataset.toPyDataSet(data) for col in row]
#system.tag.writeBlocking(tagPath,values)
values = system.dataset.toPyDataSet(data)
event.source.parent.getComponent('Description').text = values.getValueAt(0, 1)
#Recipe.RcpLaminator.getComponent('LaminatorLineSpeed').intValue =
event.source.parent.getComponent('RcpNotes1').text = values.getValueAt(0, 3)
event.source.parent.parent.RecipeParameters.LaminatorLineSpeed = values.GetValue(0,2)
In my code you will see where I have figured out how to push the data to my text box values, number screen areas, etc. What I have not figured out is how to make the call to the value of the custom property - any suggestions?