hdriSun Wire Parameters Z Rotation

Hi there

I've been working on a script to make the process of wiring a vray dome light z rotation to an hdri's horizontal rotation at a much faster and efficient way.

However I can't turn the following process into maxscript

wire parameters, Rotation, Z Rotation
object, Texture, horizontalRotation

Parameter wiring pops up which is another thing that needs tweaking
Z Rotation:Bezier Float
one way connection

expression -Z_Rotation


I spent a few night figuring out how could I make this work but couldn't. Thats why I would be glad if someone could point me to the right direction in this matter.

Thanks in advance