2021-10-17 18:26:00 +02:00
|
|
|
---
|
2021-08-25 16:09:31 +02:00
|
|
|
title: Accessing measurements
|
2021-10-17 18:26:00 +02:00
|
|
|
---
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-12-22 17:24:59 -08:00
|
|
|
[Measurements](/reference/measurements) are available on the `measurements` key of from the object passed
|
2022-10-12 14:42:45 +02:00
|
|
|
to your part's draft method. You can destructure them for easy access.
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-10-12 14:42:45 +02:00
|
|
|
```design/src/part.mjs
|
2024-09-28 13:13:48 +02:00
|
|
|
function draftPart = ({
|
2022-10-12 14:42:45 +02:00
|
|
|
// highlight-start
|
2022-12-22 17:24:59 -08:00
|
|
|
measurements,
|
2022-10-12 14:42:45 +02:00
|
|
|
// highlight-end
|
2024-09-28 13:13:48 +02:00
|
|
|
part
|
2022-10-12 14:42:45 +02:00
|
|
|
}) {
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-12-22 17:24:59 -08:00
|
|
|
const a = measurements.chest
|
|
|
|
const b = measurements['hips']
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-10-12 14:42:45 +02:00
|
|
|
return part
|
|
|
|
}
|
2021-08-25 16:09:31 +02:00
|
|
|
```
|
|
|
|
|
2024-09-28 13:13:48 +02:00
|
|
|
:::note
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2024-09-28 13:13:48 +02:00
|
|
|
Keep in mind that [FreeSewing uses millimeter for everything](/guides/prerequisites#units).
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2024-09-28 13:13:48 +02:00
|
|
|
:::
|