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
Section titled “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
Section titled “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
Section titled “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
Section titled “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
Section titled “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
Section titled “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
Section titled “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
Section titled “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
Section titled “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) |