Skip to content

Analysis Options Functions

These functions are used to get and set analysis options.

FunctionDescription
getFlowUnitsRetrieves a project’s flow units.
getOptionRetrieves the value of an analysis option.
getQualityInfoGets information about the type of water quality analysis requested.
getQualityTypeRetrieves the type of water quality analysis to be run.
getTimeParameterRetrieves the value of a time parameter.
setFlowUnitsSets a project’s flow units.
setOptionSets the value for an anlysis option.
setQualityTypeSets the type of water quality analysis to run.
setTimeParameterSets the value of a time parameter.

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.


Retrieves the value of an analysis option.

getOption(option: Option): number;

Parameters

ParameterTypeDescription
optionOptiona type of analysis option (see Option).

Returns

Number the current value of the option.


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;
}
PropertyTypeDescription
qualTypeQualityTypetype of analysis to run (see QualityType).
chemNamestringname of chemical constituent.
chemUnitsstringconcentration units of the constituent.
traceNodenumberindex of the node being traced (if applicable).

|


Retrieves the type of water quality analysis to be run.

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

Returns

Object

{
qualType: QualityType;
traceNode: number;
}
PropertyTypeDescription
qualTypeQualityTypethe type of analysis to run (see QualityType).
traceNodenumberthe index of node being traced, if qualType = QualityType.Trace.

Retrieves the value of a time parameter.

getTimeParameter(param: TimeParameter): number;

Parameters

ParameterTypeDescription
paramTimeParametera time parameter code (see TimeParameter).

Returns

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


Sets a project’s flow units.

setFlowUnits(units: FlowUnits): void;

Parameters

ParameterTypeDescription
unitsFlowUnitsa 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.


Sets the value for an anlysis option.

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

Parameters

ParameterTypeDescription
optionOptiona type of analysis option (see Option).
valuenumberthe new value assigned to the option.

Sets the type of water quality analysis to run.

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

Parameters

ParameterTypeDescription
qualTypeQualityTypethe type of analysis to run (see QualityType).
chemNamestringthe name of the quality constituent.
chemUnitsstringthe concentration units of the constituent.
traceNodestringthe 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.


Sets the value of a time parameter.

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

Parameters

ParameterTypeDescription
paramTimeParametera time parameter code (see TimeParameter).
valuenumberthe new value of the time parameter (in seconds)