# RulerBarViewGenerator.ScaleUnit Property

> Gets or sets the unit of the ruler bar's scale.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 21.0
- **Namespace:** `TXTextControl.ServerVisualisation`
- **Package:** `TXTextControl.TextControl.Core.SDK` (assembly `TXTextControl.Server.Core.dll`, from the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.TextControl.ASP.SDK` (assembly `TXTextControl.Server.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.Server.dll` from the setup
- **Path:** TX Text Control .NET Server > Reference > TXTextControl.ServerVisualization > RulerBarViewGenerator.ScaleUnit Property
- **437 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/rulerbarviewgenerator/scaleunit-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/rulerbarviewgenerator/scaleunit-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/rulerbarviewgenerator/scaleunit-property/llms-full.txt

---

### Description

Gets or sets the unit of the ruler bar's scale.

### Syntax

```csharp
public RulerBarScaleUnit ScaleUnit { get; set; }
```

```vbnet
Public Property ScaleUnit As RulerBarScaleUnit
```

### Members

| Value | Description |
|---|---|
| Auto | The ruler is automatically scaled in inch or in millimeter depending on the currently set culture. |
| Centimeter | The ruler bar is scaled in centimeter without millimeter marks. |
| Inch | The ruler bar is scaled in inch. |
| Millimeter | The ruler bar is scaled in centimeter including millimeter marks. |

### Examples

The following example uses `RulerBarViewGenerator.ScaleUnit` to configure scale unit as part of the ruler bar view generator workflow. The configured value is checked before the workflow continues.

```csharp
rulerBarViewGenerator.ScaleUnit = RulerBarScaleUnit.Auto;
Console.WriteLine($"Scale Unit used by Ruler Bar View Generator: {rulerBarViewGenerator.ScaleUnit}");
```

```vbnet
rulerBarViewGenerator.ScaleUnit = RulerBarScaleUnit.Auto
Console.WriteLine($"Scale Unit used by Ruler Bar View Generator: {rulerBarViewGenerator.ScaleUnit}")
```

---

## Nearby

- **Previous:** [RulerBarViewGenerator.Resolution Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/rulerbarviewgenerator/resolution-property/llms-full.txt)
- **Next:** [RulerBarViewGenerator.UserInput Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/rulerbarviewgenerator/userinput-property/llms-full.txt)
