
Introduction
The rotate angle connection lets you set the rotation of an SVG element based on a PLC value — a gauge needle that points to the current pressure, a valve handle that shows 0° (closed) to 90° (open), or an arrow that indicates wind direction. The SVGHMI Converter binds a transform="rotate(...)" attribute to a WinCC Unified property, so the angle updates in real time.
If you want to understand what happens under the hood — how a rotation centre is calculated and how hmi-bind:transform works when written by hand — read WinCC: Rotation of dynamic SVG first. This guide is the field-by-field reference for the converter.

Configuration Fields
Upload your SVG to the SVGHMI Converter and add a rotate angle connection. The form has these fields:
Rotate angle is a premium connection: you can configure it and preview the result for free, downloading the converted widget needs a credit pack.
Rotate the Entire Image
- Checked (default) — wraps all SVG content in a
<g>and rotates it around the center of the bounding box of all drawn shapes (not the center of the canvas). The Element's id and Center's id fields are disabled. - Unchecked — enables the Element's id and Center's id fields. Only the specified element rotates.
Clockwise / Anticlockwise
Toggle for the default rotation direction:
- Checked (default, label "clockwise") — positive angle values turn the element clockwise
- Unchecked (label "anticlockwise") — positive angle values turn the element counterclockwise
The direction can also be reversed at runtime through the auto-generated <Property>Direction property (for example RotateAngleDirection): setting it to true inverts the direction chosen here.
Element's id
Available when "Rotate the entire image" is unchecked. Select the element or group to rotate. This field is mandatory when whole-image rotation is off.
Center's id
Optional. Specify a different element whose center will be used as the rotation pivot. If empty, the rotation center is calculated from the target element's bounding box.
This is essential when the pivot point doesn't coincide with the element center — for example, a valve handle that rotates around its shaft, or a gauge needle that rotates around the gauge center.

WinCC Property
The property name for the angle value (default: RotateAngle). Rules:
- Must not be empty
- Latin letters and digits only — no spaces, underscores or special characters
- Cannot start with a digit
Examples: Angle, ValvePosition, NeedleAngle
Default Angle
Initial rotation angle in degrees (0–360, whole numbers). Default: 0. It becomes the default value of the WinCC property.
Text field's id
Optional. Select a <text> or <textPath> element to display the current angle value.
Generated SVGHMI Code
The converter adds a <g> with a rotation binding. For a single element, the new <g> wraps the element; for a group, it is created inside the group around its children (so the group keeps its own id and transform):
<g hmi-bind:transform="rotate({{ ParamProps.AngleDirection ? ParamProps.Angle * -1 : ParamProps.Angle }}, 105, 80 )"> <!-- Rotated content --> </g>
Where 105, 80 is the rotation center (X, Y), automatically calculated from the element's bounding box or from the specified center element. The code above is generated with the toggle set to "clockwise"; with "anticlockwise" the two branches are swapped.
Direction Logic
With the default "clockwise" setting:
AngleDirection = false(default) → angle applied as-is → positive values turn clockwise (the SVG Y axis points down, so a positiverotate()angle is clockwise on screen)AngleDirection = true→ angle multiplied by -1 → positive values turn counterclockwise
With "anticlockwise" selected in the converter, the mapping is reversed: false → counterclockwise, true → clockwise.
Auto-Generated Parameters
Each rotate angle connection creates two hmi:paramDef entries:
<hmi:paramDef name="Angle" type="number" default="0"/> <hmi:paramDef name="AngleDirection" type="boolean" default="false"/>
The Angle default is the Default Angle you entered; <Property>Direction always starts as false, i.e. the direction chosen with the toggle. In WinCC Unified, you bind the Angle property to a PLC tag (e.g., valve position sensor), and the widget rotates accordingly.
Rotation Center Calculation
The converter calculates the center point from the element's bounding box:
- Simple elements (rect, circle, ellipse, line, path, polygon, polyline): center of the bounding box, including the element's own
transform - Groups: recursively calculates bounds of all children, taking nested group transforms into account
- Custom center: uses the center of the element specified in the
Center's idfield <text>,<image>and<use>elements are not measured — use a shape (or a group of shapes) as the rotated element and as the center element
The calculated center is shown in square brackets in the conversion report, e.g. needle[105.0, 80.0].
Example: Valve Position Control
The video shows the same idea on a damper (shutter) widget: the blade turns to the angle shown in the text field. A typical ball valve indicator uses a 0°–90° range:
- 0° = closed
- 90° = fully open
Configure:
- Element's id: the valve handle element
- Center's id: a circle at the shaft position
- Default Angle: 0 (closed)
- Direction: clockwise
In WinCC, bind the Angle property to a tag that holds the position in degrees (0–90). The widget uses the value as degrees directly and has no Min/Max properties, so if your tag is in % or raw counts, scale it in the PLC or with the HMI tag's linear scaling.
Setting Up Custom Rotation Centers
For elements that should rotate around an off-center point (e.g., eccentric valve mechanisms, gauge needles):
- In your SVG editor, create a small guide element (circle or crosshair) at the desired pivot point
- Assign it an ID (e.g.,
rotation_center) - In the converter, uncheck "Rotate the entire image"
- Set Element's id to the rotating part (e.g.,
valve_handle) - Set Center's id to the pivot element (e.g.,
rotation_center)
Place the guide element either inside the rotating group or at the same level as the rotating element. The guide element will remain in the converted widget but can be made invisible (zero opacity or minimal size).
Troubleshooting
Element rotates around the wrong point:
- Use the Center's id field with a dedicated pivot element. The auto-calculated bounding box center may not match the desired rotation axis.
- If the pivot element sits inside a different group that has its own
transform(translate, scale), that transform is not applied to the pivot and the center comes out shifted. Move the pivot out of that group or into the rotating group.
Rotation looks shifted or offset:
- Verify the ViewBox dimensions in your SVG. The coordinate system must provide enough space for the full rotation range.
- Check that the rotation center element is positioned correctly in the SVG editor.
- If the conversion report says the rotation center cannot be found, the rotated element or the center element is a
<text>,<image>or<use>— use a shape or a group of shapes instead.
Angle direction is inverted:
- Toggle the clockwise/anticlockwise setting, or change the
<Property>Directionproperty in WinCC at runtime.
Connection Config Reference
| Field | Type | Default | Description |
|---|---|---|---|
type | string | — | "rotate angle" |
prop | string | "RotateAngle" | Property name (generates <prop> and <prop>Direction) |
elemId | string | — | Target element ID (required when rotateAll: false) |
value | number | 0 | Default rotation angle (0–360°) |
center | string | — | Element ID to use as rotation center |
rotateAll | boolean | true | Rotate entire SVG vs only the target element |
direction | boolean | true | Default direction: true = positive angles turn clockwise while <prop>Direction is false |
bindText | boolean | true | Display angle in a text element (applied only when textField is set) |
textField | string | — | ID of a <text> element for value display |
Additional Resources
- SVGHMI Converter
- WinCC: Rotation of dynamic SVG — rotation centers and
hmi-bind:transformexplained step by step - Display Connection — conditional visibility
- Height and Width — dynamic sizing
- WinCC: svg to svghmi widget converter — overview of all connections and options
- HMI Widget Library
FAQ
How do I set a custom rotation center for an SVG element?
Draw a small guide element, such as a circle, at the pivot point and give it an ID. In the converter, uncheck Rotate the entire image, set Element's id to the rotating part and Center's id to the guide element. The converter uses the center of that element's bounding box as the pivot.
How do I reverse the rotation direction?
Switch the clockwise/anticlockwise toggle in the converter, or set the generated <Property>Direction property to true in WinCC Unified at runtime. Both invert the sign of the angle.
Can I bind the angle to a value in percent?
The widget uses the property value as degrees and has no Min/Max properties. If your tag holds percent or raw counts, scale it to degrees in the PLC or with the linear scaling of the HMI tag.
What is the difference between rotate angle and rotary animation?
Rotate angle sets a fixed angle from a value, like a gauge needle or valve handle. Rotary animation spins an element continuously, like a fan or motor, with a controllable speed.

