Class PropertyGroup
Represents a dictionary of string PropertyGroup to be written to an Inventor.Document.
Inheritance
Implements
Inherited Members
Namespace: iPropertyGroups
Assembly: iPropertyGroups.dll
Syntax
[Serializable]
public class PropertyGroup : IDictionary<string, string>, ICollection<KeyValuePair<string, string>>, IEnumerable<KeyValuePair<string, string>>, IEnumerable
Constructors
| Improve this Doc View SourcePropertyGroup()
Creates an empty PropertyGroup object.
Declaration
public PropertyGroup()
PropertyGroup(Dictionary<String, String>)
Creates a PropertyGroup initialized with the provided Dictionary<string, string> object.
Declaration
public PropertyGroup(Dictionary<string, string> props)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.Dictionary<System.String, System.String> | props | Dictionary containing the property values. |
Properties
| Improve this Doc View SourceIsReadOnly
Returns a boolean indicating if the object is read-only.
Declaration
public bool IsReadOnly { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Item[String]
Returns a Dictionary value for the provided key.
Declaration
public string this[string key] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.String | key | PropertyGroup key |
Property Value
Type | Description |
---|---|
System.String | PropertyGroup value |
Keys
Gets a collection containing the keys in the PropertyGroup Dictionary<string, string>.
Declaration
public ICollection<string> Keys { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.ICollection<System.String> |
Properties
Main dictionary object that holds the string PropertyGroup values.
Declaration
public Dictionary<string, string> Properties { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.String, System.String> |
Values
Gets a collection containing the values in PropertyGroup Dictionary<string, string>.
Declaration
public ICollection<string> Values { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.ICollection<System.String> |
Methods
| Improve this Doc View SourceAdd(KeyValuePair<String, String>)
Adds the specified KeyValuePair to the collection.
Declaration
public void Add(KeyValuePair<string, string> item)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.KeyValuePair<System.String, System.String> | item | The PropertyGroup name and value |
Add(String, String)
Adds the specified key and value to the collection.
Declaration
public void Add(string key, string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | PropertyGroup name |
System.String | value | PropertyGroup value |
ApplyTo(Document)
Applies the PropertyGroup iProperties to the specified Inventor Document. This version will not overwrite any existing iProperties in the document.
Declaration
public void ApplyTo(Document document)
Parameters
Type | Name | Description |
---|---|---|
Inventor.Document | document | Inventor Document |
ApplyToAndOverwrite(Document)
Applies the PropertyGroup iProperties to the specified Inventor Document. This version will overwrite any existing iProperties in the document.
Declaration
public void ApplyToAndOverwrite(Document document)
Parameters
Type | Name | Description |
---|---|---|
Inventor.Document | document | Inventor Document |
Clear()
Removes all of the keys and values from the PropertyGroup<string, string>.
Declaration
public void Clear()
Contains(KeyValuePair<String, String>)
Determine whether the PropertyGroup<string, string> contains a specified KeyValuePair<string, string>.
Declaration
public bool Contains(KeyValuePair<string, string> item)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.KeyValuePair<System.String, System.String> | item | KeyValuePair<string, string> |
Returns
Type | Description |
---|---|
System.Boolean | true if the PropertyGroup<string, string> contains the specified KeyValuePair<string, string> |
ContainsKey(String)
Determines if the PropertyGroup<string, string> contained the specified key.
Declaration
public bool ContainsKey(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | PropertyGroup key |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if the PropertyGroup<string, string> contains an element with the specified key, otherwise false. |
CopyTo(KeyValuePair<String, String>[], Int32)
Not implemented for now.
Declaration
public void CopyTo(KeyValuePair<string, string>[] array, int arrayIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.KeyValuePair<System.String, System.String>[] | array | |
System.Int32 | arrayIndex |
Count()
Gets the number of key/value pairs in the PropertyGroup<string, string> object.
Declaration
public long Count()
Returns
Type | Description |
---|---|
System.Int64 | the number of key/value pairs as long. |
GetEnumerator()
Returns an enumerator that iterates through the PropertyGroup<string, string>.
Declaration
public IEnumerator<KeyValuePair<string, string>> GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<System.String, System.String>> | A Dictionary<string, string>.Enumerator structure for the PropertyGroup<string, string>. |
Remove(KeyValuePair<String, String>)
Removes the specified value with the specified KeyValuePair from the PropertyGroup<string, string> dictionary.
Declaration
public bool Remove(KeyValuePair<string, string> item)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.KeyValuePair<System.String, System.String> | item |
Returns
Type | Description |
---|---|
System.Boolean | true if the element is successfully found and removed; otherwise, false. This method returns false if the KeyValuePair is not found in the PropertyGroup<string, string> |
Remove(String)
Removes the specified value with the specified key from the PropertyGroup<string, string> dictionary.
Declaration
public bool Remove(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | PropertyGroup key |
Returns
Type | Description |
---|---|
System.Boolean | true if the element is successfully found and removed; otherwise, false. This method returns false if the key is not found in the PropertyGroup<string, string> |
TryGetValue(String, out String)
Gets the value associated with the specified key.
Declaration
public bool TryGetValue(string key, out string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | PropertyGroup key |
System.String | value | PropertyGroup value |
Returns
Type | Description |
---|---|
System.Boolean | true if the PropertyGroup<string, string> contains an element with the specified key, otherwise false. |
Explicit Interface Implementations
| Improve this Doc View SourceICollection<KeyValuePair<String, String>>.Count
Gets the number of key/value pairs in the PropertyGroup Dictionary<string, string>
Declaration
int ICollection<KeyValuePair<string, string>>.Count { get; }
Returns
Type | Description |
---|---|
System.Int32 |
IDictionary<String, String>.Remove(String)
Removes the specified value with the specified key from the PropertyGroup<string, string> dictionary.
Declaration
bool IDictionary<string, string>.Remove(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | PropertyGroup key |
Returns
Type | Description |
---|---|
System.Boolean | true if the element is successfully found and removed; otherwise, false. This method returns false if the key is not found in the PropertyGroup<string, string> |
IEnumerable.GetEnumerator()
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator |