# Rotating graphic is changing sizes at random

**URL:** <https://forum.inductiveautomation.com/t/rotating-graphic-is-changing-sizes-at-random/71822>\
**Category:** Ignition\
**Tags:** vision, ignition81\
**Created:** [March 30, 2023, 12:33pm UTC](https://forum.inductiveautomation.com/t/rotating-graphic-is-changing-sizes-at-random/71822 "2023-03-30T12:33:52Z")\
**Posts on this page:** 3\
**Page:** 3

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 16, 2023, 4:42pm UTC](https://forum.inductiveautomation.com/t/rotating-graphic-is-changing-sizes-at-random/71822/41 "2023-05-16T16:42:18Z")

</div>

> [@justinedwards.jle](#):
>
> `#entire repaint script`

Well, that should just be a call to a project library script function, where all the necessary imports and constants don't have to be set up every paint.

---

<div class="post-metadata">

**Author:** ![steven.rehnborg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/steven.rehnborg/32/4952_2.png) [@steven.rehnborg](https://forum.inductiveautomation.com/u/steven.rehnborg)\
**Post date:** [May 16, 2023, 4:44pm UTC](https://forum.inductiveautomation.com/t/rotating-graphic-is-changing-sizes-at-random/71822/42 "2023-05-16T16:44:04Z")

</div>

> [@lrose](#):
>
> `value = event.source.Setpoint if event.source.Setpoint else 0`

Awesome! I had guess at the cause but wasn't sure of a solution. I didn't realize I could use that like that. I appreciate it everybody! 😀

---

<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:** [May 16, 2023, 4:49pm UTC](https://forum.inductiveautomation.com/t/rotating-graphic-is-changing-sizes-at-random/71822/43 "2023-05-16T16:49:58Z")

</div>

It was kind of a quick and dirty solution, however, if you're planning to use many of these components then @pturmel's suggestion is much better.

That would look something like:

```auto
if all(event.source.Setpoint,event.source.Value,event.source.SetpointColor):
    project.shared.paintGuage(event.source.Setpoint,event.source.Value,event.source.SetpointColor)

```

You'll want to verify any property that you're using in the script that also has a binding on it.

[Previous page](https://forum.inductiveautomation.com/t/rotating-graphic-is-changing-sizes-at-random/71822.md?page=2)
