> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# unit_convert class

**Namespace:** [Ans.DataProcessing.operators.math](https://developer.synopsys.com/docs/dpf/dpf-mechanical/api/Ans.DataProcessing/operators/math)

## Summary

Converts an input field/fields container or mesh of a given unit to another unit.

available inputs: `entity_to_convert` (Field, FieldsContainer, MeshedRegion, MeshesContainer), `unit_name` (string, Int32, Field)

available outputs: `converted_entity` (Field ,FieldsContainer ,MeshedRegion ,MeshesContainer)

## Example

```python theme={null}
op = unit_convert()

op = unit_convert(entity_to_convert=my_entity_to_convert,unit_name=my_unit_name)
```

## Class Information

| Property | Value |
| - | - |
| Namespace | `Ans.DataProcessing.operators.math` |
| Assembly | `Ans_Dpf_Native_dll_cs` |
| Base Class | `Ans.DataProcessing.internal_objects.BaseOperator` |

## Inputs

### entity\_to\_convert

**Type:** *LinkableInput*

### unit\_name

unit as a string, ex 'm' for meter, 'Pa' for pascal,... Or ansys unit system's ID, or a field from which expected unit will be extracted.

**Type:** *LinkableInput*

## Outputs

### converted\_entity

the output entity is the same as the input (inplace operator)

**Type:** *LinkableOutput*

## Constructors

#### Constructor

```python theme={null}
unit_convert()
```

#### Constructor

```python theme={null}
unit_convert(entity_to_convert, unit_name, config)
```

**Parameters:**

* `entity_to_convert` (*object*)
* `unit_name` (*object*)
* `config` (*OperatorConfig*)

#### Constructor

```python theme={null}
unit_convert(config)
```

**Parameters:**

* `config` (*OperatorConfig*)

## Methods

## Properties

#### inputs

**Type:** *InputSpec*

```python theme={null}
# Get or set the property
value = obj.inputs
obj.inputs = new_value
```

#### outputs

**Type:** *OutputSpec*

```python theme={null}
# Get or set the property
value = obj.outputs
obj.outputs = new_value
```

#### defaultConfig

**Type:** *Config*

```python theme={null}
# Get the property (read-only)
value = obj.defaultConfig
```
