---
title: "init(rawValue:)"
framework: phase
role: symbol
role_heading: Initializer
path: "phase/phasespatialcategory/init(rawvalue:)"
---

# init(rawValue:)

Initializes a spatial category with the given string.

## Declaration

```swift
init(rawValue: String)
```

## Parameters

- `rawValue`: The enumeration case’s underlying string value.

## Discussion

Discussion To initialize a spatial category: // Set the raw-value variable to the `directPathTransmission` constant.  var rawValue: String = PHASESpatialCategoryDirectPathTransmission var spatialPipelineOption = PHASESpatialCategory(rawValue: rawValue) To check a spatial category’s raw value, see the Objective-C declaration of the struct member.
