I’m trying to use an Ignition script to change the binding of a property using scripting.
I’m using this script:
a = system.tag.getConfiguration('[default]FV_102/FullStall/Ack')
x = (a[0]['opcItemPath'])
print('opcItemPath: ', x)
print('Type: ', type(x))
The result is this:
('opcItemPath: ', {bindType=parameter, binding={OPC_Item_Path}.{TagName}})
('Type: ', <type 'com.inductiveautomation.ignition.common.config.BoundValue'>)
My issue is that I do not know how to create / modify the BoundValue datatype. Setting the opcItemPath equal a string of the desired path does not work. I have to manually go back into the UDT and apply the change.
The information that I found on the BoundValue is this: http://files.inductiveautomation.com/sdk/javadoc/ignition80/8.0.0-beta/com/inductiveautomation/ignition/common/config/BoundValue.html
The system.tag.configure document doesn’t have an example on using parameters (it does for setting parameters). https://docs.inductiveautomation.com/display/DOC80/system.tag.configure
Is it possible to bind a parameter to a property via scripting?