GoExpress - Persist Diagram Layout state


I would like to know how do I persist the diagram's layout after the user closes and reopen the application for example. By persist I mean, to keep the focus at the same node the was before.
Hope I was clear on the explanation :-)
Thanks in advance

You probably just need to save and restore the GoView.DocPosition and DocScale properties.

I suppose you could also remember which objects were in the GoView.Selection, if that might be helpful to your users.

I was going in the direction of the GoView.Selection but I was getting some errors, because I was saving the selected node in a Custom Storage file. and when I tried to show the diagram and select the node saved, I was getting the “GoObject must be in view or document…” error.

Didn't have time to understand it, since your DocPosition solution solved the problem.
Thanks a lot!