Bezier link curviness from control points model data

Hi,

I have a link with the following properties:

{ curve: go.Link.Bezier, adjusting: go.Link.Stretch, reshapable: true },

This enables the user to adjust the curviness using two control points. I would like to store and load these control points from model data. What is the best way to achieve this?

Sidenode; I’m using the addModelChangedListener (with model.toIncrementalData) and mergeLinkDataArray methods to sync the data eventually with the app data model. I could loop through all diagram links in these methods (if we have a dummy bind on the curviness for example) and sync with the app model this way but this seems not the most efficient way. What would be your suggestion?

A TwoWay Binding in the link template should work:

new go.Binding("points").makeTwoWay()

What you ask for cannot be controlled by the Link.curviness property, unless you are willing to have less flexibility: State Chart with Simple Curved Link Reshaping

Thanks, this works!