# MTConfigAttribSet

The MTConfigAttribSet object represents a set of attributes (metadata) describing a configuration property (MTConfigProp). An attribute is a name/value pair. This class provides methods to get and set attributes into the configuration set. One example of an attribute is PTYPE, which specifies the data type of the configuration property.

## Program ID

MetraTech.MTConfigAttribSet.1

## MTConfigAttribSet Methods

AddPair | Adds a key/value pair to the set.
get_AttrValue | Retrieves an attribute's value, based on its key.
get_Count | Gets the count of attribute name/value pairs in the set.
GetAttrItem | Gets a key and its associated value, given an index into the set.
Initialize | Initializes the object.
RemoveAttr | Removes an attribute, based on its key.

## Example

Example to be provided in a future release of this online help system.

# Method Details

## get_Count

Gets the count of attribute name/value pairs in the set.

### Visual Basic Syntax

### C++ Syntax

STDMETHODIMP CMTConfigAttribSet::get_Count (long * pVal)

### Arguments

None.

### Return Value

long * pVal

The count of attribute name and value pairs in the set.

## get_AttrValue

Retrieves an attribute's value, based on its key.

### Visual Basic Syntax

### C++ Syntax

STDMETHODIMP CMTConfigAttribSet::get_AttrValue (BSTR bstrKey, BSTR * pVal)

### Arguments

BSTR bstrKey

The key associated with the attribute.

### Return Value

BSTR * pVal

The value of the attribute.

## AddPair

Adds a key/value pair to the set.

### Visual Basic Syntax

### C++ Syntax

STDMETHODIMP CMTConfigAttribSet::AddPair(/*[in]*/ BSTR bstrKey, /*[in]*/ BSTR pVal)

### Arguments

BSTR bstrKey

The key to add.

BSTR pVal

The value to add.

## Initialize

Initializes the object.

### Visual Basic Syntax

### C++ Syntax

STDMETHODIMP CMTConfigAttribSet::Initialize ()

## RemoveAttr

Removes an attribute, based on its key.

### Visual Basic Syntax

### C++ Syntax

STDMETHODIMP CMTConfigAttribSet::RemoveAttr (BSTR key)

### Arguments

BSTR key

The key associated with the attribute.

## GetAttrItem

Gets a key and its associated value, given an index into the set.

### Visual Basic Syntax

### C++ Syntax

STDMETHODIMP CMTConfigAttribSet::GetAttrItem (long aIndex, BSTR * pKey, BSTR * pValue)

### Arguments

long aIndex

The index of the attribute to get.

### Return Value

BSTR * pKey

The key to retrieve.

BSTR * pValue

The value of the key.