    

 ## On this page

  

 

 # ansys::dpf::UnitSystem Struct Reference

 Last update: 16.07.2025 

`#include <dpf_api_base.h>`

## <a id="pub-methods" name="pub-methods"></a>Public Member Functions

 [UnitSystem](structansys_1_1dpf_1_1UnitSystem.xhtml#a87331afc8cfb97200f342280fd49e536) (std::string const &amp;name, int id)  [UnitSystem](structansys_1_1dpf_1_1UnitSystem.xhtml#a588643682966a84ffbed42a60eb5aa93) (std::string const &amp;name, std::string const &amp;unit\_names)  [operator std::string](structansys_1_1dpf_1_1UnitSystem.xhtml#aed08cd4b0916d79cd83929674fd6a8d5) () const const char \* [c\_str](structansys_1_1dpf_1_1UnitSystem.xhtml#a7e8ff2d5918c48d3a4be9c30beffc8d7) () const [dp\_id](namespaceansys_1_1dpf.xhtml#ab4574c9af3f2bb8011da7d1f4c8da20e) [getId](structansys_1_1dpf_1_1UnitSystem.xhtml#a4344c11cdda170ff215ea0e8d9ab40e4) () const std::string [getUnitNames](structansys_1_1dpf_1_1UnitSystem.xhtml#a835847ebc0bbc0566938299f232e0bab) () const <a id="a49cfc761dd7c25410aea932346906bfc" name="a49cfc761dd7c25410aea932346906bfc"></a>bool **operator==** ([UnitSystem](structansys_1_1dpf_1_1UnitSystem.xhtml) const &amp;rhs) const <a id="details" name="details"></a>## Detailed Description

System of measurement units.



## Constructor &amp; Destructor Documentation

<a id="a87331afc8cfb97200f342280fd49e536" name="a87331afc8cfb97200f342280fd49e536"></a>## [◆ ](#a87331afc8cfb97200f342280fd49e536)UnitSystem() \[1/2\]

 ansys::dpf::UnitSystem::UnitSystem  ( std::string const &amp;  *name*,    int  *id*   )   explicit 

Create new unit system.

Parameters \[in\]nameName of unit system. \[in\]idCommon unit system identifier used by Ansys. 



<a id="a588643682966a84ffbed42a60eb5aa93" name="a588643682966a84ffbed42a60eb5aa93"></a>## [◆ ](#a588643682966a84ffbed42a60eb5aa93)UnitSystem() \[2/2\]

 ansys::dpf::UnitSystem::UnitSystem  ( std::string const &amp;  *name*,    std::string const &amp;  *unit\_names*   )   explicit 

Creates a new custom unit system from its base unit strings

Parameters \[in\]nameName of unit system \[in\]unit\_namessemicolon-separated list of base units (Length, Mass, Time, Temperature, Electric Charge and Angle) 



## Member Function Documentation

<a id="a7e8ff2d5918c48d3a4be9c30beffc8d7" name="a7e8ff2d5918c48d3a4be9c30beffc8d7"></a>## [◆ ](#a7e8ff2d5918c48d3a4be9c30beffc8d7)c\_str()

 const char \* ansys::dpf::UnitSystem::c\_str  ( )  const

Gets name of unit system.

ReturnsName of unit system. 



<a id="a4344c11cdda170ff215ea0e8d9ab40e4" name="a4344c11cdda170ff215ea0e8d9ab40e4"></a>## [◆ ](#a4344c11cdda170ff215ea0e8d9ab40e4)getId()

 [dp\_id](namespaceansys_1_1dpf.xhtml#ab4574c9af3f2bb8011da7d1f4c8da20e) ansys::dpf::UnitSystem::getId  ( )  const

Gets identifer of unit system.

ReturnsId of unit system. 



<a id="a835847ebc0bbc0566938299f232e0bab" name="a835847ebc0bbc0566938299f232e0bab"></a>## [◆ ](#a835847ebc0bbc0566938299f232e0bab)getUnitNames()

 std::string ansys::dpf::UnitSystem::getUnitNames  ( )  const

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

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



<a id="aed08cd4b0916d79cd83929674fd6a8d5" name="aed08cd4b0916d79cd83929674fd6a8d5"></a>## [◆ ](#aed08cd4b0916d79cd83929674fd6a8d5)operator std::string()

 ansys::dpf::UnitSystem::operator std::string  ( )  const

Name of unit system.