Intro_Course_4_2_2 - nasa/gunns GitHub Wiki

Intro Course 4.2.2: Starting From a Blank Drawing

You don’t have to start with the EmptyNetwork.xml template. You can easily create a network from the default blank drawing. However you’ll need to do a few extra steps.

  • Open Draw.io and select Create New Diagram → Blank Diagram.
    • Give it your filename in the Filename box. Note the file extension defaults to .drawio, but we need it to be .xml, so change it to .xml.
    • Name the drawing the same as your network class name will be, like SysSubsysAspect.xml. See the recommended naming convention for networks in the previous page.
    • Save the drawing in your project folder, not in the gunns/ repository.
    • Click Create.
  • The blank drawing has one layer named ‘Background’, which can be inspected by menu selection View → Layers. The name of the layer doesn’t matter, but you must eventually put the network container box inside this initial layer. So, we recommend changing this layer name to ‘Network’, by double-clicking the layer name in the Layers window. This way you won’t forget which layer is supposed to hold the network container, if you add more layers later.
  • In the Diagram tab of the Format panel (far right), we recommend turning on View: Grid, and Options: Connection Points. We recommend turning off Options: Connection Arrows and Guides.
  • Select File → Open Library… from the menu and navigate to gunns/draw/libraries/GUNNS_Generic.xml to open that library.
  • Add a Network box from the GUNNS_Generic.xml library into the Network layer of your drawing.
  • Note in the pages tab at the bottom that there is one page named ‘Page-1’. The name of this page doesn’t matter, but make sure you only add the Network container to this initial page. Later, when you export your network code from this drawing, it will ignore anything on any pages other than the first page.

Previous Page / Next Page

⚠️ **GitHub.com Fallback** ⚠️