ur code.
  You can set a property on the <code>window</code> object to refer to the Diagram that you create.
  Many of the samples do this just by leaving out the <code>var</code> declaration:
  <pre class="lang-js"><code>myDiagram = new go.Diagram("myDiagramDiv", . . .);</code></pre>
</p>
<p>
  Alternatively, in the console, if you know the name of the HTML DIV element,
  you can call the static function <a>Diagram.fromDiv</a> to get the <a>Diagram</a> object:
  <pre class="lang-js"><code> myDiagram = go.D