---
title: CMGetIndProfileElementInfo
framework: Application Services
role: pseudoSymbol
platforms: []
path: applicationservices/colorsync_manager/1804996-cmgetindprofileelementinfo
---

# CMGetIndProfileElementInfo

Obtains the element tag and data size of an element by index from the specified profile. 

## Declaration

```occ
CMError CMGetIndProfileElementInfo (
   CMProfileRef prof,
   UInt32 index,
   OSType *tag,
   UInt32 *elementSize,
   Boolean *refs
);
```

## Parameters

- `prof`: A profile reference of type [doc://com.apple.documentation/documentation/applicationservices/cmprofileref](applicationservices/cmprofileref.md) to the profile containing the element.
- `index`: A one-based element index within the range returned by the `elementCount` parameter of the `CMCountProfileElements` function.
- `tag`: A pointer to an element signature. On return, the tag signature of the element corresponding to the index.
- `elementSize`: A pointer to an element size. On return, the size in bytes of the element data corresponding to the tag.
- `refs`: A pointer to a reference count flag. On return, set to `true` if more than one tag in the profile refers to element data associated with the tag corresponding to the index.

## Return Value

A `CMError` value. See [Result Codes](../colorsync_manager.md).

## Overview

The index order of elements is determined internally by the ColorSync Manager and is not publicly defined.

Before calling the `CMGetIndProfileElementInfo` function, you should call the function [CMCountProfileElements](1804963-cmcountprofileelements.md), which returns the total number of elements in the profile in the `elementCount` parameter. The number you specify for the `index` parameter when calling `CMGetIndProfileElementInfo` should be in the range of 1 to `elementCount`; otherwise the function will return a result code of `cmIndexRangeErr`. 

You might want to call this function, for example, to print out the contents of a profile. 

## See Also

### Accessing Profile Elements

- [CMCountProfileElements](1804963-cmcountprofileelements.md)
- [CMProfileElementExists](1804967-cmprofileelementexists.md)
- [CMGetProfileElement](1804973-cmgetprofileelement.md)
- [CMSetProfileElement](1804977-cmsetprofileelement.md)
- [CMSetProfileElementSize](1804980-cmsetprofileelementsize.md)
- [CMGetPartialProfileElement](1804984-cmgetpartialprofileelement.md)
- [CMSetPartialProfileElement](1804989-cmsetpartialprofileelement.md)
- [CMGetIndProfileElement](1805002-cmgetindprofileelement.md)
- [CMSetProfileElementReference](1805005-cmsetprofileelementreference.md)
- [CMRemoveProfileElement](1805008-cmremoveprofileelement.md)
