Skip to content

Analysis Options Functions

These functions are used to get and set analysis options.

Function Description
getFlowUnits Retrieves a project's flow units.
getOption Retrieves the value of an analysis option.
getQualityInfo Gets information about the type of water quality analysis requested.
getQualityType Retrieves the type of water quality analysis to be run.
getTimeParameter Retrieves the value of a time parameter.
setFlowUnits Sets a project's flow units.
setOption Sets the value for an anlysis option.
setQualityType Sets the type of water quality analysis to run.
setTimeParameter Sets the value of a time parameter.

getFlowUnits

Retrieves a project's flow units.

getFlowUnits(): FlowUnits;

Returns

Number a flow units code (see FlowUnits)

Flow units in liters or cubic meters implies that SI metric units are used for all other quantities in addition to flow. Otherwise US Customary units are employed.


getOption

Retrieves the value of an analysis option.

getOption(option: Option): number;

Parameters

Parameter Type Description
option Option a type of analysis option (see Option).

Returns

Number the current value of the option.


getQualityInfo

Gets information about the type of water quality analysis requested.

getQualityInfo(): {
qualType: QualityType;
chemName: string;
chemUnits: string;
traceNode: number;
};

Returns

Object

{
  qualType: QualityType;
  chemName: string;
  chemUnits: string;
  traceNode: number;
}
Property Type Description
qualType QualityType type of analysis to run (see QualityType).
chemName string name of chemical constituent.
chemUnits string concentration units of the constituent.
traceNode number index of the node being traced (if applicable).

|


getQualityType

Retrieves the type of water quality analysis to be run.

getQualityType(): {
qualType: QualityType;
traceNode: number;
};

Returns

Object

{
  qualType: QualityType;
  traceNode: number;
}
Property Type Description
qualType QualityType the type of analysis to run (see QualityType).
traceNode number the index of node being traced, if qualType = QualityType.Trace.

getTimeParameter

Retrieves the value of a time parameter.

getTimeParameter(param: TimeParameter): number;

Parameters

Parameter Type Description
param TimeParameter a time parameter code (see TimeParameter).

Returns

Number the current value of the time parameter (in seconds).


setFlowUnits

Sets a project's flow units.

setFlowUnits(units: FlowUnits): void;

Parameters

Parameter Type Description
units FlowUnits a flow units code (see FlowUnits)

Flow units in liters or cubic meters implies that SI metric units are used for all other quantities in addition to flow. Otherwise US Customary units are employed.


setOption

Sets the value for an anlysis option.

setOption(option: Option, value: number): void;

Parameters

Parameter Type Description
option Option a type of analysis option (see Option).
value number the new value assigned to the option.

setQualityType

Sets the type of water quality analysis to run.

setQualityType(qualType: QualityType, chemName: string, chemUnits: string, traceNode: string): void;

Parameters

Parameter Type Description
qualType QualityType the type of analysis to run (see QualityType).
chemName string the name of the quality constituent.
chemUnits string the concentration units of the constituent.
traceNode string the ID name of the node being traced if qualType = QualityType.Trace.

Chemical name and units can be an empty string if the analysis is not for a chemical. The same holds for the trace node if the analysis is not for source tracing.

Note that the trace node is specified by ID name and not by index.


setTimeParameter

Sets the value of a time parameter.

setTimeParameter(param: TimeParameter, value: number): void;

Parameters

Parameter Type Description
param TimeParameter a time parameter code (see TimeParameter).
value number the new value of the time parameter (in seconds)