---
title: "ShuttleKnob (Basic)"
canonical: "https://docs.cuesystem.com/space/CVCGC/407666710/ShuttleKnob%20(Basic)"
format: markdown
---
> Macro (toc)

---

# Description

This type of knob can be infinitely rotated and it is typically used for precise setting of any analog value like temperature, light level, etc. It allows the user to change value relatively. ShuttleKnob generates event OnRotation where the direction of rotation is delivered as a parameter. A number of events generated for one rotation are set by the property EventsPerRevolution.

![image](media://bb9b2874-51bf-4dc8-9d88-afd03bd555c6)

# Properties

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Property Name | Data Type | Allowed Values | Default Value | Description |
| Behavior |
| EventsPerRevolution | Byte | > 0 | 100 | Number of events generated during one revolution |
| Appearance |
| ObjectSize | Long | 0 = Drag&Fit  
1 = 100x100  
2 = 120x120  
3 = 160x160  
4 = 200x200  
5 = 280x280  
6 = 360x360  
7 = 480x480  
8 = 600x600 | 0 | Specifies size of the object. If Drag&Fit is selected it picks biggest size which fits into object boundary. |

# Functions

## SetEventsPerRevolution

This function sets EventsPerRevolution to neweventsperrevolution value if neweventsperrevolution > 0. Then it returns True, else it returns False.

#### Syntax

```visualbasic
Function SetEventsPerRevolution(neweventsperrevolution As Long) As Boolean
```

## GetEventsPerRevolution

This function returns current EventsPerRevolution.

#### Syntax

```visualbasic
Function GetEventsPerRevolution() As Long
```

## SetObjectSize

This function sets object size to newobjectsize. Possible values are

- 0 = Drag&Fit
- 1 = 100x100
- 2 = 120x120
- 3 = 160x160
- 4 = 200x200
- 5 = 280x280
- 6 = 360x360
- 7 = 480x480
- 8 = 600x600

The function returns True on success or False if an error occurs.

#### Syntax

```visualbasic
Function SetObjectSize(newobjectsize As Long) As Boolean
```

## GetObjectSize

This function returns current object size. For possible values see function SetObjectSize.

#### Syntax

```visualbasic
Function GetObjectSize() As Long
```

# Events

## OnRotation

This event is generated when the knob rotates. Number of events per revolution is defined by property EventsPerRevolution.

It delivers direction of rotation in parameter clockwise

- True means Clockwise rotation
- False means Counterclockwise rotation.

#### Syntax

```visualbasic
Event OnRotation As Process(clockwise As Boolean)
```