> ## 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.

# Structure ansys::dpf::UnitSystem

![][C++]
![][public]

System of measurement units.

## Members

* [c\_str](#structansys-dpf-unitsystem-1a7e8ff2d5918c48d3a4be9c30beffc8d7)
* [getId](#structansys-dpf-unitsystem-1a4344c11cdda170ff215ea0e8d9ab40e4)
* [getUnitNames](#structansys-dpf-unitsystem-1a835847ebc0bbc0566938299f232e0bab)
* [operator==](#structansys-dpf-unitsystem-1a49cfc761dd7c25410aea932346906bfc)
* [UnitSystem](#structansys-dpf-unitsystem-1a87331afc8cfb97200f342280fd49e536)
* [UnitSystem](#structansys-dpf-unitsystem-1a588643682966a84ffbed42a60eb5aa93)

## Public functions

### Function UnitSystem

![][public]

```cpp theme={null}
ansys::dpf::UnitSystem::UnitSystem(std::string const &name, int id)
```

Create new unit system.

**Parameters**:

* std::string const & **name**: \[in] Name of unit system.
* int **id**: \[in] Common unit system identifier used by Ansys.

**Return type**:

### Function UnitSystem

![][public]

```cpp theme={null}
ansys::dpf::UnitSystem::UnitSystem(std::string const &name, std::string const &unit_names)
```

Creates a new custom unit system from its base unit strings

**Parameters**:

* std::string const & **name**: \[in] Name of unit system
* std::string const & **unit\_names**: \[in] semicolon-separated list of base units (Length, Mass, Time, Temperature, Electric Charge and Angle)

**Return type**:

### Function c\_str

![][public]
![][const]

```cpp theme={null}
const char * ansys::dpf::UnitSystem::c_str() const
```

Gets name of unit system.
**Returns**:

Name of unit system.

**Return type**: const char \*

### Function getId

![][public]
![][const]

```cpp theme={null}
dp_id ansys::dpf::UnitSystem::getId() const
```

Gets identifer of unit system.
**Returns**:

Id of unit system.

**Return type**: [dp\_id](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/namespaceansys-dpf.md#namespaceansys-dpf-1ab4574c9af3f2bb8011da7d1f4c8da20e)

### Function getUnitNames

![][public]
![][const]

```cpp theme={null}
std::string ansys::dpf::UnitSystem::getUnitNames() const
```

Gets unit\_names of unit system (if it is custom).
**Returns**:

unit\_names string of unit system (if it is custom).

**Return type**: std::string

### Function operator==

![][public]
![][const]

```cpp theme={null}
bool ansys::dpf::UnitSystem::operator==(UnitSystem const &rhs) const
```

**Parameters**:

* [UnitSystem](#structansys-dpf-unitsystem-1a87331afc8cfb97200f342280fd49e536) const & **rhs**

**Return type**: bool

[C++]: https://img.shields.io/badge/language-C%2B%2B-blue "C++"

[const]: https://img.shields.io/badge/-const-lightblue "const"

[public]: https://img.shields.io/badge/-public-brightgreen "public"

[static]: https://img.shields.io/badge/-static-lightgrey "static"
