---
title: "setTo(_:)"
framework: Scripting Bridge
role: symbol
role_heading: Instance Method
platforms: [Mac Catalyst 13.0+, macOS 10.5+]
path: "scriptingbridge/sbobject/setto(_:)"
---

# setTo(_:)

Sets the receiver to a specified value.

## Declaration

```swift
func setTo(_ value: Any?)
```

## Parameters

- `value`: The data the receiver should be set to. It can be an doc://com.apple.documentation/documentation/Foundation/NSString, doc://com.apple.documentation/documentation/Foundation/NSNumber, doc://com.apple.documentation/documentation/Foundation/NSArray, SBObject, or any other type of object supported by the Scripting Bridge framework.

## Discussion

Discussion You should not call this method directly.
