Creating a custom flowchart block

This video shows how to identify reusable pieces of logic in your model, and enclose them within custom flowchart blocks. Using custom blocks will make your flowchart simpler and more concise.

How-To video: Creating a custom flowchart block

Since AnyLogic 8.3 the creation scenario has been significantly simplified.

 To create a custom flowchart block

  1. Drag the selection over the flowchart blocks you want to enclose in your custom block.
  2. Right-click any of the selected blocks and select Create custom flowchart block from the context menu.
  3. The New agent dialog box will be shown. Specify the name of your block in the Agent type name field. Click OK.
  4. You will see one block appeared in the flowchart instead of the selected blocks. It is the instance of the new agent type that was created in your model. You can find this agent type in the model's tree in the Projects view.
  5. The default block icon is a regular rectangle. To customize the icon, open the graphical diagram of your block by double-clicking the corresponding agent type in the Projects view and draw other presentation shapes on the diagram. To make some presentation shape a part of an icon, select the shape's Icon property. We recommend to locate icon shapes between the block ports.
  6. If the blocks you have enclosed in your custom contain any parameters, these parameters will be exposed to the interface of the custom block also. To customize some parameter created in your custom block, select it and adjust the parameter's Label and Control type in the Value editor section of the parameter's properties. These settings define how the parameter will look like in the properties of your custom block - what will be its label and what control will be used for editing the parameter value.