    

 ## On this page

  

 

 # ansys::Project::Metadata Class Reference

 Last update: 19.05.2025 

Dictionary of values associated with an [Iterator](classansys_1_1_project_1_1_iterator.xhtml "Pointer to a project location."). [More...](classansys_1_1_project_1_1_metadata.xhtml#details)

`#include "Metadata.hpp"`

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

bool [hasKey](classansys_1_1_project_1_1_metadata.xhtml#abd919e05d7efcaf98bfaf0311df6845d) (const std::string) const bool [removeKey](classansys_1_1_project_1_1_metadata.xhtml#a8b6eb082695c32ae5d06f4aecea370c8) (const std::string) bool [isString](classansys_1_1_project_1_1_metadata.xhtml#a1c2f546afd23f3a2397c980f841b0da9) (const std::string) const bool [isInt](classansys_1_1_project_1_1_metadata.xhtml#a07cc9f6ac86cf32a8d659b7f9bb5cc1f) (const std::string) const bool [isDouble](classansys_1_1_project_1_1_metadata.xhtml#a24256035b7e17bf21c999fc088f089c1) (const std::string) const std::string [getValue](classansys_1_1_project_1_1_metadata.xhtml#a6d11da0c0558c56dcb8ab1b6f000be9a) (const std::string) const std::vector&lt; std::string &gt; [getValueVector](classansys_1_1_project_1_1_metadata.xhtml#a525917fc5dc036a53aa759b8a960c15e) (const std::string) const int [getValueInt](classansys_1_1_project_1_1_metadata.xhtml#ac77873f44d17d640e18bbc5948c23f33) (const std::string) const double [getValueDouble](classansys_1_1_project_1_1_metadata.xhtml#a87861f638ae754280780c8f230104b8b) (const std::string) const MetaVariableType [getValueType](classansys_1_1_project_1_1_metadata.xhtml#abab0f54e360d03177ef8b3851429706a) (const std::string) const void [setValue](classansys_1_1_project_1_1_metadata.xhtml#aacd269f8408622db2061c364927f4e7b) (const std::string &amp;pKey, const std::string &amp;pValue) void [setValueVector](classansys_1_1_project_1_1_metadata.xhtml#ab032628c78a2bd2a22cd0fcacecaafb4) (const std::string &amp;pKey, const std::vector&lt; std::string &gt; &amp;pValue) void [setValue](classansys_1_1_project_1_1_metadata.xhtml#ad2121a0edeb6d864f61d5f230fafc936) (const std::string &amp;pKey, int pValue) void [setValue](classansys_1_1_project_1_1_metadata.xhtml#ac61a8d01324f5506aa05b4f31add2786) (const std::string &amp;pKey, double pValue) void [setValueLink](classansys_1_1_project_1_1_metadata.xhtml#a2dbc6fa15cf36f6992a349e51248dbbf) (const [Iterator](classansys_1_1_project_1_1_iterator.xhtml) &amp;pParent, const std::string &amp;pKey, const [Iterator](classansys_1_1_project_1_1_iterator.xhtml) &amp;pTarget) [Iterator](classansys_1_1_project_1_1_iterator.xhtml) [getValueLink](classansys_1_1_project_1_1_metadata.xhtml#a811e71c2413c0f1a46e27b9d3ec19c7c) (const [Iterator](classansys_1_1_project_1_1_iterator.xhtml) &amp;pParent, const std::string &amp;pKey) const bool [isLink](classansys_1_1_project_1_1_metadata.xhtml#a816dec9fe8849410e911f4e7ae382d98) (const std::string &amp;pKey) const void [copyAllTo](classansys_1_1_project_1_1_metadata.xhtml#a61a6f5d39031a67dc4f5856474fac6ca) ([Metadata](classansys_1_1_project_1_1_metadata.xhtml) &amp;pTarget) const void [copyValueTo](classansys_1_1_project_1_1_metadata.xhtml#a184457ae2de0ed6d1eb1910c8870408e) (const std::string &amp;pKey, [Metadata](classansys_1_1_project_1_1_metadata.xhtml) &amp;pTarget) const std::vector&lt; std::string &gt; [getKeys](classansys_1_1_project_1_1_metadata.xhtml#a58998f025b033eaca68381643caa9094) () const Return the list of variables in the metadata index. [More...](classansys_1_1_project_1_1_metadata.xhtml#a58998f025b033eaca68381643caa9094)  
 void [reset](classansys_1_1_project_1_1_metadata.xhtml#a01cf56db6f944df2af40d726bef98d29) ()  [Metadata](classansys_1_1_project_1_1_metadata.xhtml#a635b82bdfa6352e304294be51e0b8031) () <a id="details" name="details"></a>## Detailed Description

Dictionary of values associated with an [Iterator](classansys_1_1_project_1_1_iterator.xhtml "Pointer to a project location.").

The metadata index is mapping a variable name to a value and type. Each variable has a single type. The metadata of an [Iterator](classansys_1_1_project_1_1_iterator.xhtml "Pointer to a project location.") is obtained through [Iterator::getMeta()](classansys_1_1_project_1_1_iterator.xhtml#affabcdae62ef0ffe44e5ff877f8b3653 "Returns the Metadata for this project item.") and can be accessed/modified as such

```
 it.getMeta().setValue("Temperature",288.)
   it.isDouble() == true
 double t = it.getMeta().getValueDouble("Temperature");
 it.getMeta().setValue("Temperature",288)
   it.isDouble() == false
   it.isInt() == false
 it.getMeta().setValue("Temperature","288")
   it.isString() == true
```

 The metadata changes will be saved in the project index at the next [Project::saveProject()](classansys_1_1_project_1_1_project.xhtml#a5c10d316ae316b4e77b77707986115d5 "Save the currently opened project.")



## Constructor &amp; Destructor Documentation

<a id="a635b82bdfa6352e304294be51e0b8031" name="a635b82bdfa6352e304294be51e0b8031"></a>## [◆ ](#a635b82bdfa6352e304294be51e0b8031)Metadata()

 ansys::Project::Metadata::Metadata  ( )   inline 





## Member Function Documentation

<a id="a61a6f5d39031a67dc4f5856474fac6ca" name="a61a6f5d39031a67dc4f5856474fac6ca"></a>## [◆ ](#a61a6f5d39031a67dc4f5856474fac6ca)copyAllTo()

 void ansys::Project::Metadata::copyAllTo  ( [Metadata](classansys_1_1_project_1_1_metadata.xhtml) &amp;  *pTarget*)  const





<a id="a184457ae2de0ed6d1eb1910c8870408e" name="a184457ae2de0ed6d1eb1910c8870408e"></a>## [◆ ](#a184457ae2de0ed6d1eb1910c8870408e)copyValueTo()

 void ansys::Project::Metadata::copyValueTo  ( const std::string &amp;  *pKey*,    [Metadata](classansys_1_1_project_1_1_metadata.xhtml) &amp;  *pTarget*   )  const





<a id="a58998f025b033eaca68381643caa9094" name="a58998f025b033eaca68381643caa9094"></a>## [◆ ](#a58998f025b033eaca68381643caa9094)getKeys()

 std::vector&lt; std::string &gt; ansys::Project::Metadata::getKeys  ( )  const

Return the list of variables in the metadata index.





<a id="a6d11da0c0558c56dcb8ab1b6f000be9a" name="a6d11da0c0558c56dcb8ab1b6f000be9a"></a>## [◆ ](#a6d11da0c0558c56dcb8ab1b6f000be9a)getValue()

 std::string ansys::Project::Metadata::getValue  ( const std::string  *pKey*)  const





<a id="a87861f638ae754280780c8f230104b8b" name="a87861f638ae754280780c8f230104b8b"></a>## [◆ ](#a87861f638ae754280780c8f230104b8b)getValueDouble()

 double ansys::Project::Metadata::getValueDouble  ( const std::string  *pKey*)  const





<a id="ac77873f44d17d640e18bbc5948c23f33" name="ac77873f44d17d640e18bbc5948c23f33"></a>## [◆ ](#ac77873f44d17d640e18bbc5948c23f33)getValueInt()

 int ansys::Project::Metadata::getValueInt  ( const std::string  *pKey*)  const





<a id="a811e71c2413c0f1a46e27b9d3ec19c7c" name="a811e71c2413c0f1a46e27b9d3ec19c7c"></a>## [◆ ](#a811e71c2413c0f1a46e27b9d3ec19c7c)getValueLink()

 [Iterator](classansys_1_1_project_1_1_iterator.xhtml) ansys::Project::Metadata::getValueLink  ( const [Iterator](classansys_1_1_project_1_1_iterator.xhtml) &amp;  *pParent*,    const std::string &amp;  *pKey*   )  const





<a id="abab0f54e360d03177ef8b3851429706a" name="abab0f54e360d03177ef8b3851429706a"></a>## [◆ ](#abab0f54e360d03177ef8b3851429706a)getValueType()

 MetaVariableType ansys::Project::Metadata::getValueType  ( const std::string  *pKey*)  const





<a id="a525917fc5dc036a53aa759b8a960c15e" name="a525917fc5dc036a53aa759b8a960c15e"></a>## [◆ ](#a525917fc5dc036a53aa759b8a960c15e)getValueVector()

 std::vector&lt; std::string &gt; ansys::Project::Metadata::getValueVector  ( const std::string  *pKey*)  const





<a id="abd919e05d7efcaf98bfaf0311df6845d" name="abd919e05d7efcaf98bfaf0311df6845d"></a>## [◆ ](#abd919e05d7efcaf98bfaf0311df6845d)hasKey()

 bool ansys::Project::Metadata::hasKey  ( const std::string  *pKey*)  const





<a id="a24256035b7e17bf21c999fc088f089c1" name="a24256035b7e17bf21c999fc088f089c1"></a>## [◆ ](#a24256035b7e17bf21c999fc088f089c1)isDouble()

 bool ansys::Project::Metadata::isDouble  ( const std::string  *pKey*)  const





<a id="a07cc9f6ac86cf32a8d659b7f9bb5cc1f" name="a07cc9f6ac86cf32a8d659b7f9bb5cc1f"></a>## [◆ ](#a07cc9f6ac86cf32a8d659b7f9bb5cc1f)isInt()

 bool ansys::Project::Metadata::isInt  ( const std::string  *pKey*)  const





<a id="a816dec9fe8849410e911f4e7ae382d98" name="a816dec9fe8849410e911f4e7ae382d98"></a>## [◆ ](#a816dec9fe8849410e911f4e7ae382d98)isLink()

 bool ansys::Project::Metadata::isLink  ( const std::string &amp;  *pKey*)  const





<a id="a1c2f546afd23f3a2397c980f841b0da9" name="a1c2f546afd23f3a2397c980f841b0da9"></a>## [◆ ](#a1c2f546afd23f3a2397c980f841b0da9)isString()

 bool ansys::Project::Metadata::isString  ( const std::string  *pKey*)  const





<a id="a8b6eb082695c32ae5d06f4aecea370c8" name="a8b6eb082695c32ae5d06f4aecea370c8"></a>## [◆ ](#a8b6eb082695c32ae5d06f4aecea370c8)removeKey()

 bool ansys::Project::Metadata::removeKey  ( const std::string  *pKey*) 





<a id="a01cf56db6f944df2af40d726bef98d29" name="a01cf56db6f944df2af40d726bef98d29"></a>## [◆ ](#a01cf56db6f944df2af40d726bef98d29)reset()

 void ansys::Project::Metadata::reset  ( ) 





<a id="aacd269f8408622db2061c364927f4e7b" name="aacd269f8408622db2061c364927f4e7b"></a>## [◆ ](#aacd269f8408622db2061c364927f4e7b)setValue() \[1/3\]

 void ansys::Project::Metadata::setValue  ( const std::string &amp;  *pKey*,    const std::string &amp;  *pValue*   ) 





<a id="ac61a8d01324f5506aa05b4f31add2786" name="ac61a8d01324f5506aa05b4f31add2786"></a>## [◆ ](#ac61a8d01324f5506aa05b4f31add2786)setValue() \[2/3\]

 void ansys::Project::Metadata::setValue  ( const std::string &amp;  *pKey*,    double  *pValue*   ) 





<a id="ad2121a0edeb6d864f61d5f230fafc936" name="ad2121a0edeb6d864f61d5f230fafc936"></a>## [◆ ](#ad2121a0edeb6d864f61d5f230fafc936)setValue() \[3/3\]

 void ansys::Project::Metadata::setValue  ( const std::string &amp;  *pKey*,    int  *pValue*   ) 





<a id="a2dbc6fa15cf36f6992a349e51248dbbf" name="a2dbc6fa15cf36f6992a349e51248dbbf"></a>## [◆ ](#a2dbc6fa15cf36f6992a349e51248dbbf)setValueLink()

 void ansys::Project::Metadata::setValueLink  ( const [Iterator](classansys_1_1_project_1_1_iterator.xhtml) &amp;  *pParent*,    const std::string &amp;  *pKey*,    const [Iterator](classansys_1_1_project_1_1_iterator.xhtml) &amp;  *pTarget*   ) 





<a id="ab032628c78a2bd2a22cd0fcacecaafb4" name="ab032628c78a2bd2a22cd0fcacecaafb4"></a>## [◆ ](#ab032628c78a2bd2a22cd0fcacecaafb4)setValueVector()

 void ansys::Project::Metadata::setValueVector  ( const std::string &amp;  *pKey*,    const std::vector&lt; std::string &gt; &amp;  *pValue*   )