2021-10-17 18:26:00 +02:00
|
|
|
---
|
2021-08-25 16:09:31 +02:00
|
|
|
title: Accessing user options
|
|
|
|
for: developers
|
|
|
|
about: Shows you how to access user options from inside your pattern
|
2021-10-17 18:26:00 +02:00
|
|
|
---
|
2021-08-25 16:09:31 +02:00
|
|
|
|
|
|
|
Options are stored in `pattern.settings.options`.
|
|
|
|
|
2022-02-19 08:04:25 +01:00
|
|
|
You can pull them out of there with
|
2021-08-25 16:16:51 +02:00
|
|
|
the [shorthand](/howtos/code/shorthand/) call:
|
2021-08-25 16:09:31 +02:00
|
|
|
|
|
|
|
```js
|
|
|
|
const { measurements, options } = part.shorthand()
|
|
|
|
|
|
|
|
let sleeveBonus = measurements.shoulderToWrist * (1 + options.sleeveLengthBonus);
|
|
|
|
```
|