Saving node locations to json file

I want to save the data of the genogram diagram I created in a json file and then rebuild the diagram with the same json file. I’ve done the save and rebuild, but I want to save the locations of the moved nodes in a json file somehow. In this way, when the diagram is rebuilt from the json file, the nodes will stay in the saved location.

How can I do that? Thanks.

Use a TwoWay Binding on the Node.location property. Make sure there’s no layout that occurs when you load the model, either by not setting Diagram.layout or by setting Layout.isInitial to false on the layout.

1 Like