
Automation 2-49
2-49
RealVariable/RealFlexVariable
The RealVariable object provides additional information about a
particular variable such as its units and whether it is calculated
or set. HYSYS performs all calculations in SI units regardless of
how the user preference settings are set. By default, the values
returned through Automation are also in SI units. It becomes
your responsibility to handle how units are handled when writing
applications.
A RealVariable contains a property called GetValue and SetValue
which allows one to specify the units that are to be used when
returning or setting the value.
The RealVariable object also contains a property called Value.
The Value property returns the actual value in SI units within
the HYSYS case. Many of the objects that return a RealVariable
for a given property also have a similarly named property with
the word value concatenated to it. The alternative property
allows direct access to the actual variable in SI units with one
less function call. An example for the ProcessStream object
would be the Temperature property that returns a RealVariable
and the TemperatureValue property, that returns a value in °C.
The RealFlexVariable contains roughly the same properties and
methods as the RealVariable but is used for array values
Syntax for using RealVariable
SimulationCase.Flowsheet.MaterialStreams.Item(0).property
RealVariable Properties/Methods
GetValue
Gets the value in a specified unit.
SetValue
Sets the value in a specified unit.
Status
Returns calculated or specified
Value
Value in SI units.
Komentáře k této Příručce