Using Instance Names in tag paths that need square brackets

I am working with premade UDTs that address each tag in a UDT by a couple of parameters then the instance name. The problem is, to fit with the actual OPC tag path, I need to use square brackets in the tag path, which means I need to use square brackets in the instance name. When I pulled one of the tags over from the OPC browser to see how it handled, it used underscores instead of brackets. I tried to replicate this hoping it would recognize it, but it doesn’t.

Is it possible to use some sort of substitute here or do I need to overhaul the UDT itself?

Why do you need brackets in the instance name? Example:

ns=1;s=[{PLC}]Global.{InstanceName}.Failure

The “PLC” parameter in this instance is the device connection name in Ignition, then of course the “InstanceName” is the tag I want to look at for a failure. Say PT1001. If I had an array of PTs:

ns=1;s=[{PLC}]Global.PT[{InstanceName}].Failure

I would add the PT prefix, and the brackets. InstanceName (now just an array index number) then goes inside the brackets. So, can’t you just put the brackets in the OPC path where needed?