# MetaDataExtensions class

Namespace: [Grasshopper2.Data.Meta](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.data.meta.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public static class MetaDataExtensions
```

A set of extension methods for [MetaData](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.meta.metadata.md).

## Methods

- [AnyMetaData](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.meta.metadataextensions/anymetadata.md): (2 overloads, static) Test a collection to see if it has any meta data.
- [AsIcon](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.meta.metadataextensions/asicon.md): (2 overloads, static) Gets the icon associated with a specific meta data type.
- [Density](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.meta.metadataextensions/density.md): (static)
- [Embed](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.meta.metadataextensions/embed.md): (static) Embed a set of meta data in a Rhino user dictionary.
- [Extract](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.meta.metadataextensions/extract.md): (static) Extract a set of meta data from a Rhino user dictionary. This is the inverse of [MetaDataExtensions.Embed(MetaData, ArchivableDictionary)](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.meta.metadataextensions/embed.md); only entries stored under a `GH2:` prefixed key are considered. Note that functions and gradients cannot survive a round-trip, they come back as text.
- [HasReferenceId](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.meta.metadataextensions/hasreferenceid.md): (2 overloads, static) Gets whether meta data has a Rhino reference ID. This method does not check the validity of the id, just whether it has been defined. Because this is an extension method, it can be called on null meta data.
- [HasVectorAnchor](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.meta.metadataextensions/hasvectoranchor.md): (2 overloads, static) Gets whether meta data has a vector anchor point.
- [IsNullOrEmpty](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.meta.metadataextensions/isnullorempty.md): (static) Test whether meta data is null or empty.
- [PerformCompare](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.meta.metadataextensions/performcompare.md): (16 overloads, static) Check whether meta data contains a key which matches the given name, and whose value matches a given comparison.
- [Remove](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.meta.metadataextensions/remove.md): (static) Remove the specified names from all metadata in an array.
- [Resolve](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.meta.metadataextensions/resolve.md): (16 overloads, static) Check whether meta data contains a key which matches the given pattern, and output the associated value.
- [ToMetaData](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.meta.metadataextensions/tometadata.md): (static) Harvest metadata from Rhino userstrings. Note that all returned values are marked as 'transient' which is an internal state that allows Grasshopper to remove them in the case of an update.
- [TryGet<T>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.meta.metadataextensions/tryget.md): (2 overloads, static) Try to get the value with the given name. If the name is defined but associated with a value type other than T, a widening conversion will be performed if possible.
- [TryGetMatch](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.meta.metadataextensions/trygetmatch.md): (static) Try and find the first value whose name matches the given pattern.
- [WithoutReferenceId](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.meta.metadataextensions/withoutreferenceid.md): (static) Remove reference id data from meta data.
- [WithoutTransientMetaData](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.meta.metadataextensions/withouttransientmetadata.md): (2 overloads, static) Remove the transient meta data entries which are not supposed to be copied to offspring values.
- [WithReferenceId](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.meta.metadataextensions/withreferenceid.md): (static) Add a reference id to meta data.
- [Zip<T>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.meta.metadataextensions/zip.md): (2 overloads, static) Zip an item and a meta data collection into a Pair collection.
