View Connections of a Model

View Connections from Command Line

The openmdao view_connections command generates a table of connection information for all input and output variables in the model. For more in-depth documentation, see openmdao view_connections.

View Connections from Script

You can also generate a display of model connections from within a script by calling the function view_connections.

openmdao.visualization.connection_viewer.viewconns.view_connections(root, outfile='connections.html', show_browser=True, show_values=True, precision=6, title=None)[source]

Generate a self-contained html file containing a detailed connection viewer.

Optionally pops up a web browser to view the file.

rootsystem or Problem

The root for the desired tree.

outfilestr, optional

The name of the output html file. Defaults to ‘connections.html’.

show_browserbool, optional

If True, pop up a browser to view the generated html file. Defaults to True.

show_valuesbool, optional

If True, retrieve the values and display them.

precisionint, optional

Sets the precision for displaying array values.

titlestr, optional

Sets the title of the web page.

Here is an example of how this function can be used.

import openmdao.api as om
from openmdao.test_suite.components.sellar import SellarNoDerivatives

prob = om.Problem()
prob.model = SellarNoDerivatives()


om.view_connections(prob, outfile= "sellar_connections.html", show_browser=False)

In this example, an HTML file named sellar_connections.html is created. This file can then be opened using using your browser. The page will look like this.

An example of a connection viewer

An example of a connection viewer.