Input Box¶
![]()
Input box placed on the flowsheet: a value entered in it is written directly to the property SelectedProperty of the object named by SelectedObjectID, and reading its "Value" property returns the current value of that target property. It has no calculation of its own.
DWSIM.UnitOperations.UnitOperations.Input
Assembly DWSIM.UnitOperations.dll · Object ← BaseClass ← UnitOpBaseClass ← Input
At a glance¶

This object has no stream connections; it acts on other objects through their properties.
Example¶
This code runs on every build of this site, and the output below is what it printed.
fs = (Flowsheet.Create("InputBoxExample")
.WithCompound("Water")
.WithPropertyPackage(PropertyPackages.SteamTables))
feed = fs.AddMaterialStream("Cold water").At(Q.Celsius(20.0), Q.Bar(2.0)).WithMassFlow(Q.KgPerSecond(2.0))
product = fs.AddMaterialStream("Warm water")
duty = fs.AddEnergyStream("H-1 duty")
heater = (fs.AddHeater("H-1").WithOutletTemperature(Q.Celsius(50.0))
.ConnectFeed(feed).ConnectProduct(product).ConnectEnergyFeed(duty, 1))
su = fs.Inner.FlowsheetOptions.SelectedUnitSystem
builder = fs.AddUnitOperation(ObjectType.Input, "TIN-1")
box = builder.Object.__implementation__
box.SelectedObjectID = heater.Object.Name
box.SelectedProperty = "PROP_HT_2" # outlet temperature
box.SelectedPropertyUnits = heater.Object.GetPropertyUnit("PROP_HT_2", su)
fs.AutoLayout()
fs.Solve()
q_before = heater.HeatDutyKW
# Typing a value in the box writes it to the linked property, in the flowsheet units.
target = fs.Inner.SimulationObjects[box.SelectedObjectID]
target.SetPropertyValue(box.SelectedProperty, 65.0, su)
fs.Solve()
shown = target.GetPropertyValue(box.SelectedProperty, su)
print(f"Input box shows = {float(shown):.1f} {box.SelectedPropertyUnits}")
print(f"Outlet temperature = {product.TemperatureK - 273.15:.2f} C")
print(f"Heater duty = {q_before:.1f} kW at 50 C, {heater.HeatDutyKW:.1f} kW at 65 C")
Output
Input box shows = 65.0 C
Outlet temperature = 65.00 C
Heater duty = 250.8 kW at 50 C, 376.2 kW at 65 C
DWSIM 10.2.11.0, generated 2026-10-08.
Properties¶
IDs accepted by GetPropertyValue, SetPropertyValue, the sensitivity analysis, the optimizer, the Adjust block and dynamic events. Units are SI; pass another unit system to GetPropertyValue to get them converted.
| ID | Name | Unit (SI) | Input |
|---|---|---|---|
Value |
Input Value | K | yes |
SelectedObjectTag |
Target Object | result | |
SelectedProperty |
Target Property | result | |
SelectedPropertyUnits |
Display Units | result |
Learn more¶
-
User guide
API members¶
Public members declared by this class. Inherited members are documented on the base classes.
Constructors¶
Input(): Initializes a new default instance of the Input class.
Initializes a new default instance of the Input class.
Input(string, string): Initializes a new instance of the Input class with a name and description.
Initializes a new instance of the Input class with a name and description.
| Parameter | Type | Description |
|---|---|---|
name |
String |
The name of this input box. |
description |
String |
A brief description of this input box. |
Properties¶
MobileCompatible: Gets a value indicating whether this input box is compatible with mobile interfaces.
Gets a value indicating whether this input box is compatible with mobile interfaces. Always False.
ObjectClass: Gets or sets the simulation object class category (Inputs).
Gets or sets the simulation object class category (Inputs).
SupportsDynamicMode: Gets a value indicating whether this input box can run in dynamic simulation mode.
Gets a value indicating whether this input box can run in dynamic simulation mode. Always True.
Methods¶
Calculate(object): Calculates the object.
Calculates the object.
| Parameter | Type | Description |
|---|---|---|
args |
Object |
CloneXML(): Creates a deep copy of this object by round-tripping through XML serialization.
Creates a deep copy of this object by round-tripping through XML serialization.
CloseEditForm(): Closes the editor of this object, if it is open.
Closes the editor of this object, if it is open.
DeCalculate(): Decalculates the object.
Decalculates the object.
DisplayEditForm(): Opens the editor of this object.
Opens the editor of this object. A host that has no editor for it does nothing.
GetDisplayDescription(): Returns the localized description string for this object type.
Returns the localized description string for this object type.
GetDisplayName(): Returns the localized display name for this object type.
Returns the localized display name for this object type.
GetEditingForm(): The editor window of this object, a window of the host's UI framework.
The editor window of this object, a window of the host's UI framework.
GetIconBitmapBytes(): Returns the raw bytes of the icon image for this input box.
Returns the raw bytes of the icon image for this input box.
GetProperties(PropertyType): Returns the list of property identifiers available for this input.
Returns the list of property identifiers available for this input. The object and property it writes to are text and are listed only under ALL.
| Parameter | Type | Description |
|---|---|---|
proptype |
PropertyType |
The type of properties to retrieve. |
GetPropertyDescription(string): Readable names for the property identifiers, which are the .NET property names.
Readable names for the property identifiers, which are the .NET property names.
| Parameter | Type | Description |
|---|---|---|
prop |
String |
GetPropertyUnit(string, IUnitsOfMeasure): Returns the unit string for the specified property.
Returns the unit string for the specified property.
| Parameter | Type | Description |
|---|---|---|
prop |
String |
The property identifier string. |
su |
IUnitsOfMeasure |
The unit system to use; defaults to SI if not provided. |
GetPropertyValue(string, IUnitsOfMeasure): Returns the value of the specified property.
Returns the value of the specified property. "Value" is the current value of the target property, in the given unit system (SI when none is given).
| Parameter | Type | Description |
|---|---|---|
prop |
String |
The property identifier string. |
su |
IUnitsOfMeasure |
The unit system to use; defaults to SI if not provided. |
SetPropertyValue(string, object, IUnitsOfMeasure): Sets the value of the specified property.
Sets the value of the specified property. Setting "Value" writes it to the target property, in the given unit system (SI when none is given).
| Parameter | Type | Description |
|---|---|---|
prop |
String |
The property identifier string. |
propval |
Object |
The new value to assign. |
su |
IUnitsOfMeasure |
The unit system of the supplied value; defaults to SI if not provided. |
UpdateEditForm(): Redraws the editor of this object with the current values, if it is open.
Redraws the editor of this object with the current values, if it is open.
Fields¶