---
title: CMSetProfileElementReference
framework: Application Services
role: pseudoSymbol
platforms: []
path: applicationservices/colorsync_manager/1805005-cmsetprofileelementreference
---

# CMSetProfileElementReference

Adds a tag to the specified profile to refer to data corresponding to a previously set element. 

## Declaration

```occ
CMError CMSetProfileElementReference (
   CMProfileRef prof,
   OSType elementTag,
   OSType referenceTag
);
```

## Parameters

- `prof`: A profile reference of type [doc://com.apple.documentation/documentation/applicationservices/cmprofileref](applicationservices/cmprofileref.md) to the profile to add the tag to.
- `elementTag`: The original element’s signature tag corresponding to the element data to which the new tag will refer.
- `referenceTag`: The new tag signature to add to the profile to refer to the element data corresponding to `elementTag`.

## Return Value

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

## Overview

After the `CMSetProfileElementReference` function executes successfully, the specified profile will contain more than one tag corresponding to a single piece of data. All of these tags are of equal importance. Your application can set a reference to an element that was originally a reference itself without circularity. 

If you call the function [CMSetProfileElement](1804977-cmsetprofileelement.md) subsequently for one of the tags acting as a reference to another tag’s data, then the element data you provide is set for the tag and the tag is no longer considered a reference. Instead, the tag corresponds to its own element data and not that of another tag. 

## 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)
- [CMGetIndProfileElementInfo](1804996-cmgetindprofileelementinfo.md)
- [CMGetIndProfileElement](1805002-cmgetindprofileelement.md)
- [CMRemoveProfileElement](1805008-cmremoveprofileelement.md)
