2021-10-17 18:26:00 +02:00
|
|
|
---
|
|
|
|
title: rmd
|
|
|
|
---
|
2021-08-25 16:09:31 +02:00
|
|
|
|
|
|
|
The `rmd` macro removes a dimension.
|
|
|
|
It is provided by the [dimension plugin](/reference/plugins/dimension/).
|
|
|
|
|
|
|
|
To be able to use this plugin, you need to give your dimension an id:
|
|
|
|
|
2022-09-30 04:39:30 +02:00
|
|
|
## Signature
|
|
|
|
|
2021-08-25 16:09:31 +02:00
|
|
|
```js
|
2022-09-30 04:39:30 +02:00
|
|
|
macro('rmd', {
|
|
|
|
String id
|
2021-08-25 16:09:31 +02:00
|
|
|
})
|
|
|
|
```
|
|
|
|
|
2022-09-30 04:39:30 +02:00
|
|
|
## Example
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-09-30 04:39:30 +02:00
|
|
|
<Example caption="An example of the rmd macro">
|
2021-08-25 16:09:31 +02:00
|
|
|
```js
|
2022-09-30 04:39:30 +02:00
|
|
|
({ Point, macro, part }) => {
|
|
|
|
|
|
|
|
macro('ld', {
|
|
|
|
from: new Point(10, 0),
|
|
|
|
to: new Point(40, 0),
|
|
|
|
d: 5,
|
|
|
|
id: 'da',
|
|
|
|
})
|
|
|
|
|
|
|
|
macro('ld', {
|
|
|
|
from: new Point(10, 20),
|
|
|
|
to: new Point(80, 20),
|
|
|
|
d: 5,
|
|
|
|
id: 'db',
|
|
|
|
})
|
|
|
|
|
|
|
|
macro('rmd', { id: 'db' })
|
|
|
|
|
|
|
|
return part
|
|
|
|
}
|
2021-08-25 16:09:31 +02:00
|
|
|
```
|
2022-09-30 04:39:30 +02:00
|
|
|
</Example>
|
|
|
|
|
|
|
|
## Configuration
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-02-19 08:04:25 +01:00
|
|
|
| Property | Default | Type | Description |
|
2021-08-25 16:09:31 +02:00
|
|
|
|----------|---------|----------|-------------|
|
|
|
|
| `id` | | `string` | The id of the dimension to remove |
|