Designer: Add Rotation & Mirroring Support for Templates

If we build a template to represent something simple like a cylinder or valve, the present limitations mean we either have to
[li]1 - make copies of the template with names like valveHorizontal, valveVertical, etc for every orientation we want to use it in, or[/li]
[li]2 - add a custom property to the template to specify orientation and then use that property to modify everything in the template[/li][/ul]

The first option is silly, especially when you start getting into valve45degLeft, valve30degRight, cylinder60degUp, etc.

The second option works, but is a lot more work than it would be to just rotate or mirror the whole template. You have to either build copies of things and then hide them based on the custom orientation property(ies), or do some pretty complex expressions to move things around and rework their movement bindings (if you have something moving left-right in your template, you need to rework the simple expression to much more complex calculations that works in every orientation).

I understand that supporting template mirroring and rotation may not be easy. However, I subscribe to the philosophy that it is better to do the hard thing once–even if it is much harder than the workaround–rather than to have myself or others doing a hard thing over and over again. I believe template rotation/mirroring is a feature that will eventually be supported in Ignition like in many other HMI packages, because it saves so much work in design. It makes much more sense to do a simple rotation or mirroring on the results of a complex object, rather than introduce much greater complexity into components of that object in order to achieve the simple result of rotation or mirroring.

Regarding implementation: is there a way Vision could do all the internal calculations (movement, etc) in the template in the as programmed orientation (as is presently done), and then apply the template rotation/mirroring to the results of that just before display update? In other words, to implement template mirroring/rotation, don’t reverse engineer and modify all the properties a designer has built into the template (like we have to now to make templates that internally support varying rotation or mirroring based on external template properties). Instead, just work with them as if the template was not mirrored or rotated, and add the mirroring and/or rotation as a final step just before updating the display.

There are a lot of things I love about Ignition. This is one of the few gotchas that makes me cringe a little.

[color=#004000]This post is based on Ignition 7.6.6.[/color]

Edit: Fixed typo