Doing somthing after auto layout

After an auto layout is performed, i need to set some values to nodes and links.
I implemented it by setTimeout(…,200), but it is not deterministic.
How can promise that my my code will run right after layout is finished.

Implement a “LayoutCompleted” DiagramEvent listener. GoJS Events -- Northwoods Software