# get_units_enum {{< callout context="note" title="NOTE" icon="outline/bulb" >}} Deprecated. Use `fsVarsGetUnitId` instead. {{< /callout >}}   The **get\_units\_enum** function retrieves the enum value for units, given the string name of the units.   ##### Syntax ``` wasm ENUM get_units_enum( PCSTRINGZ unitname ); ```   ##### Members {{< table-wrapper >}} | Parameters | Description | |------------|-----------------------------------------| | `unitname` | Specifies the string name of the units. | {{< /table-wrapper >}}   ##### Return Values The function returns the `ENUM` value for the units, or `UNITS_UNKNOWN` (-1) if the string name is not found.   ##### Remarks You can find a list of all the accepted strings from the page on [Simulation Variable Units](../../../simvars/simulation-variable-units/).