[FEATURE] Auto-convert relevant UDT Type tag prop values with {..} in them within tag JSON to bindings

This trips up a lot of people when they drag on a UDT from the OPC browser and create a new UDT type from it, copy json to notepad, find/replace the parts in the OPCItemPath (or others) prop values with "parameters" inside {...}, then paste back in / import over the original UDT Type, and they wonder why their UDT instance tags don't pull in values. The issue is that the newly (faux) "parameterised" values are actually not converted to bindings when they're pasted/imported back into Ignition, so they're just statically set to literally that string value.

Unless there are conditions that would prevent it, my request is that UDT Type tag json be auto-converted to bindings if the values have braces in them.

E.g. Convert:

"opcItemPath": "ns\u003d1;s\u003d[{PLCName}]{DeviceName}.Speed"

to

"opcItemPath": {
  "bindType": "parameter",
  "binding": "ns\u003d1;s\u003d[{PLCName}]{DeviceName}.Speed"
}

Idea to vote: Auto-convert relevant UDT Type tag prop values with {..} in them to bindings | Voters | Inductive Automation

1 Like

the real question is why these are distinct at all.

how often are people doing {} in an opc path and not meaning that, and even if they are that's going to trip them up half the time anyway with unclear param replacement semantics (if i do {nonexistentparam} in an opc string, should that be an error or look for the actual path {nonexistentparam}? who knows?)

I'm not 100% certain, but i'm fairly sure that an opcitempath containing braces will be invalid in all scenarios, in which case it's safe to blanket-convert these to bindings. This is what I do via script already and I've had no issues, however I only ever use a very limited number of driver modules (Logix mainly). But the fact that braces are used as the parameterisation delimiters indicates to me that they are never used as valid opcitempaths

1 Like

all the more so!

does anything break if you do

"opcItemPath": {
"bindType": "parameter",
"binding": "ns\u003d1;s\u003dnobrackets.Speed"
}

nope, probably slightly less efficient though :man_shrugging: