Skip to main content

Rocky PrePost scripting 2026 R1

RALinearTimeVariableForce

Last update: 23.02.2026

class RALinearTimeVariableForce

Rocky PrePost Scripting wrapper representing an Linear Time Variable Force motion.

Retrieve this specific wrapper after setting the correct motion type on a RAMotion. For example:

motions = motion_frame.GetMotions()
motion_1 = motions.New()
motion_1.SetType('Linear Time Variable Force')
additional_force = motion_1.GetTypeObject()

Methods:

Name Description
GetInitialForceValue([unit]) Get the value of "Initial Force Value".
GetTimeCoefficients([unit]) Get the value of "Time Coefficients".
SetInitialForceValue(values[, unit]) Set the values of "Initial Force Value".
SetTimeCoefficients(values[, unit]) Set the values of "Time Coefficients".

GetInitialForceValue(unit: str | None = None)

Get the value of “Initial Force Value”.

  • Parameters: unit – The unit for the returned values. If no unit is provided, the returned values will be in “N”.

GetTimeCoefficients(unit: str | None = None)

Get the value of “Time Coefficients”.

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

SetInitialForceValue(values: Sequence[str | float], unit: str | None = None)

Set the values of “Initial Force Value”.

  • 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 “N”.
  • Raises: RockyApiError – If values doesn’t have exactly 3 elements.

SetTimeCoefficients(values: Sequence[str | float], unit: str | None = None)

Set the values of “Time Coefficients”.

  • 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 “N/s”.
  • Raises: RockyApiError – If values doesn’t have exactly 3 elements.

Connect with Ansys