# Dynamically adjust parameters of trapezoid

**URL:** <https://forum.inductiveautomation.com/t/dynamically-adjust-parameters-of-trapezoid/100537>\
**Category:** Ignition\
**Tags:** perspective, ignition81\
**Created:** [January 7, 2025, 3:10pm UTC](https://forum.inductiveautomation.com/t/dynamically-adjust-parameters-of-trapezoid/100537 "2025-01-07T15:10:00Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![toddhowden](https://avatars.discourse-cdn.com/v4/letter/t/2acd7d/32.png) [@toddhowden](https://forum.inductiveautomation.com/u/toddhowden)\
**Post date:** [January 7, 2025, 3:10pm UTC](https://forum.inductiveautomation.com/t/dynamically-adjust-parameters-of-trapezoid/100537/1 "2025-01-07T15:10:00Z")

</div>

Is there a straightforward to dynamically adjust a trapezoid in Perspective? Normally you only have the two dimensions (width, height) and would like a little more independent control.

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [January 7, 2025, 3:12pm UTC](https://forum.inductiveautomation.com/t/dynamically-adjust-parameters-of-trapezoid/100537/2 "2025-01-07T15:12:42Z")

</div>

You could dynamically modify an SVG.

What type of parameters are you looking to control?

---

<div class="post-metadata">

**Author:** ![toddhowden](https://avatars.discourse-cdn.com/v4/letter/t/2acd7d/32.png) [@toddhowden](https://forum.inductiveautomation.com/u/toddhowden)\
**Post date:** [January 7, 2025, 3:16pm UTC](https://forum.inductiveautomation.com/t/dynamically-adjust-parameters-of-trapezoid/100537/3 "2025-01-07T15:16:53Z")

</div>

Just looking to control height on ends

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [January 7, 2025, 5:02pm UTC](https://forum.inductiveautomation.com/t/dynamically-adjust-parameters-of-trapezoid/100537/4 "2025-01-07T17:02:53Z")

</div>

Sure.

Obviously you can get much more complex than this, but it should serve as a good enough example to get you started.

![trapezoid](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/6/1644e1c4e6d082bc42f9dd5cd03baf58c2322843.gif)

Copy the JSON below and paste it into a view to see the how I did it.

```python
{
  "custom": {},
  "params": {},
  "props": {
    "defaultSize": {
      "height": 762,
      "width": 1055
    }
  },
  "root": {
    "children": [
      {
        "meta": {
          "name": "blank"
        },
        "position": {
          "height": 150,
          "width": 600,
          "x": 50,
          "y": 78
        },
        "propConfig": {
          "props.elements[0].d": {
            "binding": {
              "config": {
                "expression": "max({../Slider.props.value},5)/100 * 40"
              },
              "transforms": [
                {
                  "expression": "concat(\"M10 40 L190 40 L180 \", {value}, \" L20 \", {value}, \"Z\")",
                  "type": "expression"
                }
              ],
              "type": "expr"
            }
          }
        },
        "props": {
          "elements": [
            {
              "fill": {
                "paint": "#00000000"
              },
              "stroke": {
                "paint": "#000000"
              },
              "type": "path"
            }
          ],
          "preserveAspectRatio": "xMinYMin",
          "viewBox": "0 0 200 50"
        },
        "type": "ia.shapes.svg"
      },
      {
        "meta": {
          "name": "Slider"
        },
        "position": {
          "height": 39,
          "width": 365,
          "x": 79,
          "y": 241
        },
        "props": {
          "labels": {
            "interval": 10,
            "show": true
          }
        },
        "type": "ia.input.slider"
      },
      {
        "meta": {
          "name": "Label"
        },
        "position": {
          "height": 32,
          "width": 50,
          "x": 507,
          "y": 244.5
        },
        "propConfig": {
          "props.text": {
            "binding": {
              "config": {
                "path": "../Slider.props.value"
              },
              "type": "property"
            }
          }
        },
        "type": "ia.display.label"
      }
    ],
    "meta": {
      "name": "root"
    },
    "type": "ia.container.coord"
  }
}

```

---

<div class="post-metadata">

**Author:** ![toddhowden](https://avatars.discourse-cdn.com/v4/letter/t/2acd7d/32.png) [@toddhowden](https://forum.inductiveautomation.com/u/toddhowden)\
**Post date:** [January 28, 2025, 7:22pm UTC](https://forum.inductiveautomation.com/t/dynamically-adjust-parameters-of-trapezoid/100537/5 "2025-01-28T19:22:37Z")

</div>

This has helped. Taken me a bit to figure it out but think I am getting there. Thanks,

---

<div class="post-metadata">

**Author:** ![toddhowden](https://avatars.discourse-cdn.com/v4/letter/t/2acd7d/32.png) [@toddhowden](https://forum.inductiveautomation.com/u/toddhowden)\
**Post date:** [January 29, 2025, 2:29pm UTC](https://forum.inductiveautomation.com/t/dynamically-adjust-parameters-of-trapezoid/100537/6 "2025-01-29T14:29:40Z")

</div>

Can I ask one more question. How are you creating your image/drawing Seems to be stored inside ignition. I have used Inkscape but am not able to change it to a drawing.

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [January 29, 2025, 5:04pm UTC](https://forum.inductiveautomation.com/t/dynamically-adjust-parameters-of-trapezoid/100537/7 "2025-01-29T17:04:51Z")

</div>

When you drag and drop an SVG file on to your view in the designer, you are presented with a dialog which gives you the option to either Save and link or Embed image.

If you choose embed the SVG will be inserted into the view as a drawing object.

Here is a small example of how I do this for small less complex (my definition of complex is probably different than most when it comes to SVG) images.

> [@Drawing Tools in perspective](https://forum.inductiveautomation.com/t/drawing-tools-in-perspective/51407/3):
>
> SVG’s are the way to do it (they aren’t the only way to do it, but they are probably the best way). You can copy this into a text file, save it as a .svg file and then drag it onto your view, this will give you a blank SVG. \<?xml version="1.0" encoding="UTF-8" standalone="no"?\> \<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" width="50mm" height="50mm" viewBox="0 0 50 50" version="1.1"\> \</svg\> From there it is just a matter of understanding how to wor…

---

<div class="post-metadata">

**Author:** ![toddhowden](https://avatars.discourse-cdn.com/v4/letter/t/2acd7d/32.png) [@toddhowden](https://forum.inductiveautomation.com/u/toddhowden)\
**Post date:** [January 31, 2025, 2:14pm UTC](https://forum.inductiveautomation.com/t/dynamically-adjust-parameters-of-trapezoid/100537/8 "2025-01-31T14:14:10Z")

</div>

Thanks again. Will try it out.
