The next build has ViewportLeft, ViewportRight, ViewportTop and ViewportBottom expressions. You'll be able to use these, e.g.:
Set X to (ViewportLeft("Layer") + ViewportRight("Layer")) / 2
Set Y to (ViewportTop("Layer") + ViewportBottom("Layer")) / 2