---
title: "subscript(dynamicMember:)"
framework: corevideo
role: symbol
role_heading: Instance Subscript
path: "corevideo/cvattachmentaccess/subscript(dynamicmember:)-38ve9"
---

# subscript(dynamicMember:)

Get or set attachment value as a property of this object with default value.

## Declaration

```swift
subscript<ModePreference, Value>(dynamicMember keyPath: KeyPath<Keys.Type, CVAttachmentKeyDefinitionWithDefault<ModePreference, Value>>) -> Value where ModePreference : CVAttachmentModePreference, Value : CVAttachmentValueRepresentable, Value : Equatable, Value : Sendable { get set }
```

## Overview

Overview This subscript provides access to an attachment key as a property. The key to be accessed must be defined as a static property on the Keys type. extension CVPixelBufferAttachmentKeyDefinitions { 	static var isSpecialPicture: KeyWithDefault<ShouldPropagate, Bool> { 		.init("com.app.isSpecialPicture", default: false) 	} }

func inspect(attachments: borrowing CVAttachmentAccess<CVPixelBufferAttachmentKeyDefinitions>) { 	if attachments.isSpecialPicture { 		... 	} }
