You'll need to specify that the link is getting the source object's position in global coordinates. Otherwise the link takes the position of box2 in it's parent's coordinate system which is fixed at [0,1,0].
Code:
link1=viz.link(box2,viz.MainView,srcFlag=viz.ABS_GLOBAL)