So I have my own “layout” routine that lays out the nodes and elements in my diagram. I just ran into a scenario where the GoView is “laying out” some components of the diagram outside of my custom layout routine.
What is happening is this. I have a bulk programmatic building of the diagram that I have set a property to avoid the “layout” of the diagram as I am doing the addition of each of the elements. This was based on feedback I received on this forum. So the bulk building goes something like this.
MyCustomeDoc.DoLayout = false; (turn off any layout activities)
… bulk programmatic diagram building …
MyCustomDoc.DoLayout = true;
Inside the false/true during some of the construction, I am adding two GoComments to the GoDocument directly. For some reason, when I do that it is generating a layout of those two GoComments. I know this because in my custom layout code, I change the background color of the GoComments to a grey vs. the stock lemon color - and I am seeing a flash of the GoComments up in the upper/left corner of the diagram in the lemon background color.
So two questions:
What is triggering this to happen?
How can I actually “turn off” any layouts (or GoView redraw) until I want it to? The apparent mechanism you recommended is not working.