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-10-12 14:42:45 +02:00
|
|
|
Measurements are available on the `measurements` key of from the object passed
|
|
|
|
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
|
|
|
|
function draftPart = ({
|
|
|
|
// highlight-start
|
|
|
|
measurements,
|
|
|
|
// highlight-end
|
|
|
|
part
|
|
|
|
}) {
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-10-12 14:42:45 +02:00
|
|
|
// Do something here
|
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
|
|
|
```
|
|
|
|
|
|
|
|
<Note>
|
|
|
|
|
|
|
|
Keep in mind that [FreeSewing uses millimeter for everything](/guides/prerequisites/units).
|
|
|
|
|
|
|
|
</Note>
|