---
title: toBulLength
summary: Function in @sascom/commonjs.
order: 10
languages: [javascript]
sdk-package: JavaScript · @sascom/commonjs
---

# toBulLength

[[page:reference/javascript/api|API catalogue]] · `@sascom/commonjs` · Function

````typescript sdk=js sdk-namespace="@sascom/commonjs"
function toBulLength
````



## Members

| Member | Kind | Description |
|---|---|---|
| [[page:reference/javascript/sascom-commonjs/tobullength-f6e18031#member-sascom-commonjs-tobullength-ca7e943e9e33|toBulLength]] | Method | A length for a BUL statement: in the typed unit when the value is exact in it and BUL knows the unit ("60 cm"), otherwise mm rounded to 0.01 mm ("454.13 mm")… |

## `toBulLength` {#member-sascom-commonjs-tobullength-ca7e943e9e33}

````typescript sdk=js sdk-namespace="@sascom/commonjs"
toBulLength(mm: number, typedUnit?: string | null): string
````

A length for a BUL statement: in the typed unit when the value is exact in it and BUL knows the unit
("60 cm"), otherwise mm rounded to 0.01 mm ("454.13 mm"); zero is "0"

### Parameters

| Name | Type | Description |
|---|---|---|
| `mm` | `number` |  |
| `typedUnit` | `string \| null` |  |
