Just for troubleshooting, replace .ADDPROPERTY() method with ADDPROPERTY() function. Maybe it'll provide some additional info.
>Nope, it happens when the property is created. If I add the property manually to the VCX then the error does not occur (errors on next line which is same code but for height), so it must be something to do with the creation of the property.
>
--sb--