FlowTank
Inherits from FlowObject
Description
The main class for FloWorks content-holding objects, such as Tanks.
Properties
content | Gets or sets the current content. |
isEmpty | Returns a value indicating whether the object is empty. |
isFull | Returns a value indicating whether the object is full. |
maxContent | Gets or sets the maximum content. |
stats | Allows access to a FloWorks object's statistics. |
Details
FlowTank.content
double content
Description
Gets or sets the current content.
This property will return the current content of the object.
You can also use it to set the current content, however you should use this functionality with caution!
An error will occur if you try to set the current content lower than 0 or above the current maximum content.
FlowTank.stats
readonly stats
Description
Allows access to a FloWorks object's statistics.
This property provides the following properties and methods:
input - returns the input tracked variable
output - returns the output tracked variable
content - returns the content tracked variable
state(Variant& profile = nullvar) - returns a state tracked variable. If no profile argument is given, or if it is 1, then the default FloWorks state profile is returned. If the profile argument is equal to 0, the default FlexSim state profile is returned (note that most FloWorks objects do not use this). Other state profiles can be returned by providing the profile number or name.
// Get the state of a pump
FlowObject obj = model().find("FlowPump1");
int curState = obj.stats.state().value;