Set flow content

Overview and Key Concepts

The Set flow content instantaneously changes the current content of a content holding object, such as a flow tank. In addition it can set the maximum content of the tank to the same value, in particular when the new content is greater than the current maximum capacity.


The Set flow content activity only allows one connector out. See Adding and Connecting Activities for more information.


The following image shows properties for the Set flow content activity:

Each of these properties will be explained in the following sections.


Used to change the name of the activity. See Name for more information about this property.


The Font button opens a window to edit the activity's background color and font properties. See Font for more information about this property.


The Statistics button opens the activity's statistics window. See Statistics for more information about this property.

Object(s)/ Group / Array

Use the Object(s) / Group / Array box to specify the object(s) you want the activity to affect. You can specify a single object (using the eyedropper tool or a model.find() command), an object group (flat or nested) or an array of objects and/or groups. When a token enters the activity, the expression will be parsed recursively such that arrays of groups or groups will be properly handled.

New content

The volume that the current content of the object(s) should be set to.

If the Object(s) / Group / Array field evaluates to multiple objects, the new content will be evaluated for each object separately (and passed in as the involved parameter, so you can enter an expression like involved.content + 100 to increase whatever the content of each object is by 100).

Also set the maximum content?

In addition to setting the current content of each object, also change the maximum capacity of the object to the new content value, so that the flow tank will become full. If the new actual content exceeds the current maximum content, make sure to check this box to prevent an error message.


If the condition is not set to "Always", the activity will only perform its functionality when the condition returns true. If the Object(s) / Group / Array field evaluates to multiple objects, the condition will be checked for each object separately (and passed in as the involved parameter).

The dropdown suggests a few common conditions, such as only working on objects that currently have inflow, or are below their maximum content. You can use it to implement logical conditions (e.g. only open output if a tank is full), but also for model constraints (e.g. only do something with output port 2 if the involved object has at least two output objects).