1
0
Fork 0
freesewing/markdown/dev/howtos/code/accessing-options/en.md

18 lines
470 B
Markdown
Raw Normal View History

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