I came a crossed the same problem while trying to write to all data of a UDT. I was able to solve it with the following information:
1) Refer to link: https://forums.ni.com/t5/NI-Labs/Welcome-to-EtherNet-IP-Driver-for-Communication-to-Allen-Bradley/m-...
2) Refer to: Rockwell Automation Publication 1756-PM020E-EN-P
3) The Data has to be written as raw
4) The Tag name is the name of the UDT
5) The first byte of data has to be 0xA0
6) The second byte of data has to be 0x02
7) The third byte of data has to be 0x01 (I haven't figured this one out, it seems like it always has to be 1)
😎 The fourth byte of data has to be 0x00
9) The remaining data is the actually data that you need to write to the UDT. HOWEVER, because the PLC has rules on how it packs data the actually length is probably going to longer than you expect. It's basically on 4 byte boundaries but be careful when mixing data it' will pad data between tags of different types to maintain the 4 byte boundaries. The length of the data has to be correct or your get an error.