Cycles in Document

Is it possible to find out if the graph in the document (represented by the objects and links) contains a cyclic connection?


A->B->C->A (cycle detected)

The GoDocument methods for cycle-checking, used to see whether a proposed new link would be valid given the current value of GoDocument.ValidCycle, can’t be used efficiently for checking whether a cycle already exists.

You'll need to implement this yourself, walking the diagram by enumerating the IGoNode.Destinations for each IGoNode. You'll want to handle self-loops (reflexive links). I suppose if your document has subgraphs, you'll want to decide how to handle those too.