Methods
Test a collection to see if it has any meta data.
Parameters:
| items (IEnumerable<MetaData>) | Metadata collection to traverse. |
Test a collection to see if it has any meta data.
Parameters:
| items (MetaData[]) | Metadata collection to traverse. |
Gets the icon associated with a specific meta data type.
Parameters:
| type (MetaType) |
Gets the icon associated with a specific meta data type.
Parameters:
| notation (Notation) |
Embed a set of meta data in a Rhino user dictionary.
Parameters:
| data (MetaData) | |
| userDictionary (ArchivableDictionary) |
Returns: Number of entries added.
Extract a set of meta data from a Rhino user dictionary. This is the inverse of Embed(MetaData, ArchivableDictionary); 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.Parameters:
| userDictionary (ArchivableDictionary) |
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.
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.
Parameters:
| data (MetaData) |
Gets whether meta data has a vector anchor point.
Gets whether meta data has a vector anchor point.
Parameters:
| data (MetaData) |
Test whether meta data is null or empty.
Parameters:
| meta (MetaData) |
public static MetaDataComparison PerformCompare(this MetaData meta, string pattern, Operator op, Angle constant)
Check whether meta data contains a key which matches the given name, and whose value matches a given comparison.
public static MetaDataComparison PerformCompare(this MetaData meta, string pattern, Operator op, BigInteger constant)
Check whether meta data contains a key which matches the given name, and whose value matches a given comparison.
Parameters:
| meta (MetaData) | |
| pattern (string) | |
| op (Operator) | |
| constant (BigInteger) |
Returns: True if at least one key matches the pattern.
public static MetaDataComparison PerformCompare(this MetaData meta, string pattern, Operator op, bool constant)
Check whether meta data contains a key which matches the given name, and whose value matches a given comparison.
public static MetaDataComparison PerformCompare(this MetaData meta, string pattern, Operator op, DateTime constant)
Check whether meta data contains a key which matches the given name, and whose value matches a given comparison.
public static MetaDataComparison PerformCompare(this MetaData meta, string pattern, Operator op, double constant)
Check whether meta data contains a key which matches the given name, and whose value matches a given comparison.
public static MetaDataComparison PerformCompare(this MetaData meta, string pattern, Operator op, Guid constant)
Check whether meta data contains a key which matches the given name, and whose value matches a given comparison.
public static MetaDataComparison PerformCompare(this MetaData meta, string pattern, Operator op, int constant)
Check whether meta data contains a key which matches the given name, and whose value matches a given comparison.
public static MetaDataComparison PerformCompare(this MetaData meta, string pattern, Operator op, Interval constant)
Check whether meta data contains a key which matches the given pattern, and whose value matches a given comparison.
public static MetaDataComparison PerformCompare(this MetaData meta, string pattern, Operator op, MetaValue value)
Resolve a comparison with a meta value.
public static MetaDataComparison PerformCompare(this MetaData meta, string pattern, Operator op, Plane constant)
Check whether meta data contains a key which matches the given name, and whose value matches a given comparison.
public static MetaDataComparison PerformCompare(this MetaData meta, string pattern, Operator op, Point3d constant)
Check whether meta data contains a key which matches the given name, and whose value matches a given comparison.
public static MetaDataComparison PerformCompare(this MetaData meta, string pattern, Operator op, string constant)
Check whether meta data contains a key which matches the given name, and whose value matches a given comparison.
public static MetaDataComparison PerformCompare(this MetaData meta, string pattern, Operator op, TimeSpan constant)
Check whether meta data contains a key which matches the given name, and whose value matches a given comparison.
public static MetaDataComparison PerformCompare(this MetaData meta, string pattern, Operator op, Transform constant)
Check whether meta data contains a key which matches the given name, and whose value matches a given comparison.
public static MetaDataComparison PerformCompare(this MetaData meta, string pattern, Operator op, Vector3d constant)
Check whether meta data contains a key which matches the given name, and whose value matches a given comparison.
Check whether meta data contains a key which matches the given name.
Remove the specified names from all metadata in an array.
Parameters:
| array (MetaData[]) | Array to parse. |
| names (params MetaName[]) | Names to remove. |
Returns: Either the original array if no values were removed, a modified array if some values were removed, or null if all values were removed.
Check whether meta data contains a key which matches the given pattern, and output the associated value.
Parameters:
| meta (MetaData) | Meta data, may be null. |
| pattern (string) | Key pattern. |
| value (out BigInteger) | Value associated with key. |
Returns: True if a key was found.
Check whether meta data contains a key which matches the given pattern, and output the associated value.
Check whether meta data contains a key which matches the given pattern, and output the associated value.
Check whether meta data contains a key which matches the given pattern, and output the associated value.
Check whether meta data contains a key which matches the given pattern, and output the associated value.
Check whether meta data contains a key which matches the given pattern, and output the associated value.
Check whether meta data contains a key which matches the given pattern, and output the associated value.
Check whether meta data contains a key which matches the given pattern, and output the associated value.
Check whether meta data contains a key which matches the given pattern, and output the associated value.
Check whether meta data contains a key which matches the given pattern, and output the associated value.
Check whether meta data contains a key which matches the given pattern, and output the associated value.
Check whether meta data contains a key which matches the given pattern, and output the associated value.
Check whether meta data contains a key which matches the given pattern, and output the associated value.
Check whether meta data contains a key which matches the given pattern, and output the associated value.
Check whether meta data contains a key which matches the given pattern, and output the associated value.
Check whether meta data contains a key which matches the given pattern, and output the associated value.
public static MetaData ToMetaData(this NameValueCollection userStrings, List<Message> messages = null)
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.
Parameters:
| userStrings (NameValueCollection) | |
| messages (List<Message> = null) |
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.
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.
Try and find the first value whose name matches the given pattern.
Remove reference id data from meta data.
Remove the transient meta data entries which are not supposed to be copied to offspring values.
Parameters:
| pear (IPear) | Pear to operate on, may be null. |
| filter (TransientMetaData) | Transient data to remove. |
Remove the transient meta data entries which are not supposed to be copied to offspring values.
Parameters:
| pear (Pear<T>) | Pear to operate on, may be null. |
| filter (TransientMetaData) | Transient data to remove. |
Add a reference id to meta data.
public static IEnumerable<Pear<T>> Zip<T>(this (IEnumerable<T> items, IEnumerable<MetaData> metaData) contents)
Zip an item and a meta data collection into a Pair collection.
Parameters:
| contents ((IEnumerable<T> items, IEnumerable<MetaData> metaData)) | Tuple containing the item and meta data enumerations. |
Returns: Pair enumeration.
public static IEnumerable<Pear<T>> Zip<T>(this IEnumerable<T> items, IEnumerable<MetaData> metaData)
Zip an item and a meta data collection into a Pair collection.
Parameters:
| items (IEnumerable<T>) | Collection of item values. |
| metaData (IEnumerable<MetaData>) | Collection of meta data values. |
Returns: Pair enumeration.