Can a Vision Template Be Rotated as a Single Object?

Patricia Callen6 min read
HMI ProgrammingOther ManufacturerTutorial / How-to
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

The greyed-out rotation buttons mean the outer Vision template instance cannot be cleanly rotated with the normal editor controls in that context. The practical workaround is to group the template’s internal graphics, expose a template rotation parameter, and bind that parameter to the group’s angle property. Test labels separately: a label inside the group may prevent the result from working as intended, so true whole-template rotation is not guaranteed.

How should the greyed-out controls be interpreted?

Start at the object whose orientation must change. A template placed directly in a Vision window lives inside a TemplateHolder, which is a type of JPanel. The disabled rotation controls apply to that outer container, not necessarily to every graphical component inside the template.

This distinction separates two different requirements:

  • Rotate the template instance itself: This requires the holder, its coordinate system, and all child rendering to rotate as one object. The standard editor controls do not provide that behavior here.
  • Rotate the template’s visible contents: This can be implemented inside the template by grouping compatible components and driving the group’s angle property.

Confirm which requirement matters before editing. If the template includes only valve graphics, rotating the internal group can look identical to rotating the template. If it includes text, interaction regions, or other components that do not follow the group correctly, the distinction becomes visible.

Why does the outer template resist rotation?

Rotation is not merely a change to width and height. The runtime must transform the parent coordinate system, repaint every child through that transform, update clipping, and keep input handling aligned with the displayed result. A general-purpose Swing container such as JPanel does not automatically provide a true rotation property for its complete component hierarchy.

The internal-group method moves the rotation point down the signal chain. Instead of asking the TemplateHolder to transform the template, the template receives an angle value and passes it to a graphical group that already exposes an angle property. The holder remains axis-aligned while the group paints its graphics at the requested orientation.

That is why the workaround can rotate a valve symbol successfully but still fail to behave like a rotated container. Bounds, labels, and components outside the group remain governed by the unrotated template layout.

How does the rotation command reach the graphic?

Treat the rotation value as a control signal. The caller supplies a template parameter, the binding transfers its value, the group consumes it through angle, and the rendered graphics show the final orientation. Measure each stage before changing geometry or rebuilding the template.

Signal Source Wrong-value symptom
Requested rotation Template parameter entered or bound by the calling window Every instance remains at its default orientation or all instances show the same unintended orientation
Group angle Binding from the template parameter to the group’s angle property The parameter changes, but the valve graphics do not rotate
Visible orientation Group rendering inside the template The graphics rotate, but their position, clipping, or visual center is wrong
Label presentation Label placed inside the rotated group The grouped rotation stops working as intended or the label does not produce an acceptable result

When rotation is dynamic, inspect the live parameter and bound property first. Tuning positions, sizes, or pivots does not fix a missing or incorrect binding. Likewise, rebuilding the graphics does not fix a caller that never supplies the requested angle.

What procedure rotates the template contents?

  1. Open the template for editing. Identify every graphical item that must rotate with the valve. Keep unrelated indicators or text out of the initial test.
  2. Group the rotatable items. The group becomes the object that receives the rotation command. Verify that all required valve shapes are actually inside it.
  3. Add a template parameter for rotation. The parameter provides one instance-level input so each use of the template can request its own orientation.
  4. Bind the group’s angle property to the parameter. Confirm that the binding points from the template parameter to the group, rather than to one shape inside the group.
  5. Enter a different angle at the template instance. Use the instance parameter to command the orientation instead of attempting to use the disabled outer rotation buttons.
  6. Test without a label first. Establish that the graphical group rotates correctly before adding text or other child-component types.
  7. Add remaining components one at a time. If the behavior fails after adding a label, move the label outside the rotated group or use an alternate presentation for the text. If the label itself must rotate with the valve, validate that requirement before standardizing the template.

Grouping only some parts produces a mixed coordinate system: grouped shapes rotate while ungrouped shapes remain fixed. Use the template hierarchy to verify membership rather than relying only on the initial screen appearance.

How should the result be verified?

Test the template as an instance in the same type of Vision window where it will run. Editor appearance alone does not prove that the instance parameter, binding, and runtime painting form a complete path.

  1. Change the rotation parameter and confirm that the group’s angle property follows it.
  2. Check that every intended valve component rotates together and that no required part remains outside the group.
  3. Inspect the graphic at each orientation required by the application. Look for clipping against the unchanged template bounds and movement around an unsuitable visual center.
  4. Check labels independently. Confirm readability, placement, and whether including a label changes the group’s behavior.
  5. If multiple instances are used, assign different rotation inputs and verify that each instance responds to its own parameter.

A successful test proves more than visible movement: the commanded parameter must equal the group property, the complete symbol must move as one unit, and the result must remain usable within the holder’s unrotated bounds.

Which pitfalls recur with this workaround?

The most common mistake is treating internal group rotation as true template rotation. It is a visual workaround inside an axis-aligned TemplateHolder; it does not add rotation capability to the holder itself.

Labels are the documented trouble point in this configuration. A group that works with graphical parts may stop functioning as intended when a label is placed inside it. Isolate the label during diagnosis rather than changing the angle binding, and decide whether the text can remain outside the group.

Partial grouping causes another misleading symptom. One valve component may rotate correctly while another remains fixed, making the angle appear wrong even though the parameter and binding are correct. Inspect the group membership before adjusting the commanded value.

Finally, avoid creating multiple template versions until the content has been classified. One parameterized template is suitable when all required components respond correctly to the group’s angle. Separate orientation-specific versions remain the safer design when labels or other children cannot render acceptably as part of the rotated group.

FAQ

Why are the Vision template rotation buttons greyed out?

The template instance is hosted by a TemplateHolder, a type of JPanel, and the outer holder does not expose clean whole-template rotation through those editor controls. Rotate a compatible internal group instead.

Why does changing the template parameter not rotate the valve?

Trace the value from the instance parameter to the group’s angle property. If the parameter changes but angle does not, correct the binding; if both change, inspect group membership and rendering.

Why does rotation fail after I add a label?

A label inside the group can prevent this workaround from functioning as intended. Test the graphics without the label, then keep the label outside the rotated group or use an orientation-specific presentation if the text must rotate.

When should I stop troubleshooting and contact official support?

Stop when the parameter reaches angle correctly but required child components still fail, or when the application requires true rotation of the complete TemplateHolder rather than its internal graphics. Record the template hierarchy, binding path, affected component types, and a minimal reproducible template, then escalate through the manufacturer’s official support channel.

Back to blog