> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# RATranslation

### *class* RATranslation

Rocky PrePost Scripting wrapper representing a Translation motion.

Retrieve this specific wrapper after setting the correct motion type on a [`RAMotion`](https://developer.synopsys.com/docs/rocky/rocky-prepost-scripting/RAMotion#generated.RAMotion). For
example:

```python theme={null}
motions = motion_frame.GetMotions()
motion_1 = motions.New()
motion_1.SetType('Translation')
translation = motion_1.GetTypeObject()
```

**Methods:**

| [`GetAcceleration`](#generated.RATranslation.GetAcceleration)(\[unit]) | Get the value of "Acceleration". |
| - | - |
| [`GetFinalVelocity`](#generated.RATranslation.GetFinalVelocity)(\[unit]) | Get the value of "Final Velocity". |
| [`GetInput`](#generated.RATranslation.GetInput)() | Get "Input" as a string. |
| [`GetValidInputValues`](#generated.RATranslation.GetValidInputValues)() | Get a list of all possible values for "Input". |
| [`GetVelocity`](#generated.RATranslation.GetVelocity)(\[unit]) | Get the value of "Velocity". |
| [`SetAcceleration`](#generated.RATranslation.SetAcceleration)(values\[, unit]) | Set the values of "Acceleration". |
| [`SetFinalVelocity`](#generated.RATranslation.SetFinalVelocity)(values\[, unit]) | Set the values of "Final Velocity". |
| [`SetInput`](#generated.RATranslation.SetInput)(value) | Set the value of "Input". |
| [`SetVelocity`](#generated.RATranslation.SetVelocity)(values\[, unit]) | Set the values of "Velocity". |

#### GetAcceleration(unit: str | None = None)

Get the value of “Acceleration”.

* **Parameters:**
  **unit** – The unit for the returned values. If no unit is provided, the returned values will be in “m/s2”.

#### GetFinalVelocity(unit: str | None = None)

Get the value of “Final Velocity”.

* **Parameters:**
  **unit** – The unit for the returned values. If no unit is provided, the returned values will be in “m/s”.

#### GetInput()

Get “Input” as a string.

* **Returns:**
  The returned value will be one of \[‘fixed\_velocity’, ‘initial\_and\_final\_velocity’, ‘initial\_velocity\_and\_acceleration’].

#### GetValidInputValues()

Get a list of all possible values for “Input”.

* **Returns:**
  The returned list is \[‘fixed\_velocity’, ‘initial\_and\_final\_velocity’, ‘initial\_velocity\_and\_acceleration’].

#### GetVelocity(unit: str | None = None)

Get the value of “Velocity”.

* **Parameters:**
  **unit** – The unit for the returned values. If no unit is provided, the returned values will be in “m/s”.

#### SetAcceleration(values: Sequence\[str | float], unit: str | None = None)

Set the values of “Acceleration”.

* **Parameters:**
  * **values** – The values to set. The values can be heterogeneous, the element of values can be an
    expression with input variables or a float. Must have exactly 3 elements.
  * **unit** – The unit for values. If no unit is provided, values is assumed to be in “m/s2”.
* **Raises:**
  **RockyApiError** – If values doesn’t have exactly 3 elements.

#### SetFinalVelocity(values: Sequence\[str | float], unit: str | None = None)

Set the values of “Final Velocity”.

* **Parameters:**
  * **values** – The values to set. The values can be heterogeneous, the element of values can be an
    expression with input variables or a float. Must have exactly 3 elements.
  * **unit** – The unit for values. If no unit is provided, values is assumed to be in “m/s”.
* **Raises:**
  **RockyApiError** – If values doesn’t have exactly 3 elements.

#### SetInput(value: str)

Set the value of “Input”.

* **Parameters:**
  **value** – The value to set. Must be one of \[‘fixed\_velocity’, ‘initial\_and\_final\_velocity’, ‘initial\_velocity\_and\_acceleration’].
* **Raises:**
  **RockyApiError** – If value is not a valid “Input” option.

#### SetVelocity(values: Sequence\[str | float], unit: str | None = None)

Set the values of “Velocity”.

* **Parameters:**
  * **values** – The values to set. The values can be heterogeneous, the element of values can be an
    expression with input variables or a float. Must have exactly 3 elements.
  * **unit** – The unit for values. If no unit is provided, values is assumed to be in “m/s”.
* **Raises:**
  **RockyApiError** – If values doesn’t have exactly 3 elements.
