This works for me, although i still have to click the update button in the GUI to see the effect. chunk.updateTransform, or app.update don't seem to do it.
import PhotoScan
chunk = PhotoScan.app.document.chunk
sb = chunk.addScalebar(chunk.cameras[1],chunk.cameras[3])
sb.reference.distance = 10