Using the Diagram Editor to Create a Model

You can use the Diagram Editor to create models.

  1. Add a model in one of these ways:

The Add Model dialog box appears with the previous model type selected:

Add Model dialog box.

  1. Enter the name and click OK. The model file opens in the Diagram Editor in a separate tab.
Note:

If an editable model has been imported, you must add a new Diagram Editor. Either click the Add Diagram Editor icon in the toolbar, or select Modelica Model Editor > Add Diagram Editor.

  1. From the right side of the Diagram Editor, drag a component to the Diagram Editor. Press Esc to complete the action.

For more information, see Component Libraries.

  1. After arranging the components, use wires and connectors to connect the components. Click the input/output pins of the component and connect them to the desired pins.

Connecting components in the Diagram Editor.

  1. For Modelica models, if the component has an array interface port and you make a connection, you can select the connection and change the default value of 1 for "ArrayIndexOfConnectionX" in the Properties window.
  2. Checking component properties in the Diagram Editor.
  3. After you complete the diagram, edit the properties and parameters of the components in the Properties Manager dialog box.
  4. Click Modelica Model Editor > Update Text from Diagram or click the Update Text from Diagram icon on the Modelica ribbon. For more information, see Updating Text from Diagram.

Related Topics 

Diagram Editor

Zooming and Panning

Operations in the Diagram Editor

Variables and Definitions

Reverting Diagram Editor Changes

Deleting a Diagram Editor

Modelica Diagram Editor Settings

Updating Modelica Text from Diagram

Modelica Model Editor