Creating Vraysun via maxscript

I’ve been trying to create a targetted vraysun through recording the macro when I create a sun manually and then copying that into the listener.

This code:
--------
VRaySun name:“VRaySun01.Target” pos:[18531.1,12800.8,0] isSelected:on enabled:on
--------

Just create an untargetted vraysun light, with no options or anything to turn on the targetting.

Any ideas guys?


vrs = VRaySun name:"VRaySun01" isSelected:on pos:[0,0,100] target:(vrsTarget = Dummy())
-- variable vrs is the vraysun, and variable vrsTarget is the sun's target

Womble? Did you get this.

That worked great Colin, thanks for that!