Autolayout within a GoSheet

Hello!
We have the following scenario :
We have a GoDocument containing a GoSheet and several GoObjects. Now, if we change the size of the GoSheet, we would like the other GoObjects to be automatically arranged within the new area of the GoSheet, such that, the GoObjects don’t overlap.
I have looked at the archives, and the closest I could get was -
goView1.StartTransaction();
GoLayoutLayeredDigraph layout = new GoLayoutLayeredDigraph();
layout.Document = goView1.Document;
layout.Network = new GoLayoutNetwork();
layout.Network.AddNodesAndLinksFromCollection(… some layer or some other collection of nodes and links …, true);
layout.DirectionOption = GoLayoutDirection.Down;
layout.PerformLayout();
goView1.FinishTransaction(“layout”);
However, in the above code snippet, I can’t specify that the layout should be performed within the GoSheet bounds.
How can I solve my problem?
Thanks in advance.
Pradip
PS : The GoObjects don’t belong to GoSheet. Also, it mayn’t be possible to make the GoObjects to belong to GoSheet ‘coz it will break other functionalities.

The layered-digraph autolayout does not support limiting the area where the nodes will be positioned.
After all, if a layer is too broad, there would be no way to position them all at the same depth without having the nodes overlap.

Thank you Walter, for the quick response and the clarification! The code I presented was just a little snippet I came across when I was searching through the archives.
How can I solve my original question -
We have a GoDocument containing a GoSheet and several GoObjects. Now, if we change the size of the GoSheet, we would like the other GoObjects to be automatically arranged within the new area of the GoSheet, such that, the GoObjects don’t overlap.
Thanks,
Pradip

Any kind of layout that is limited in total area might necessarily require some overlap of the nodes.
After the layout, can you see if it’s “too big” and then change the GoView.DocScale and PrintScale smaller, and increase the size of the sheet correspondingly, so that it will fit in the desired area while appearing to keep the sheet the same screen size?