RACustomInput
Last update: 23.02.2026class RACustomInput
Rocky PrePost Scripting wrapper for a single Custom Input.
This wrapper class corresponds to an individual entry under the “Inputs” item on the project’s
data tree. Particle inputs can be retrieved from the RAStudy or the
RAInletsOutletsCollection via:
input_1 = study.GetElement('Custom Input 1>')
input_2 = input_collection.GetParticleInput('Custom Input 2>')
Instances of RACustomInput gives access to its two properties:
The id of the Particle that will be used in the particle generation and the path of the csv file which will
contain the information for each desired particle to be generated, such as, positioning, size, release time.
Methods:
| Name | Description |
|---|---|
GetAvailableMotionFrames() |
Get all available Motion Frames. |
GetAvailableParticles() |
Get all available Particles. |
GetDefaultTemperature([unit]) |
Get the value of "Default Temperature". |
GetFilePath() |
Get the value of "File Path". |
GetModuleProperties() |
Get the names of the module properties. |
GetModuleProperty(property_name[, unit]) |
Get the value of a module property. |
GetMotionFrame() |
Get the "Motion Frame". |
GetParticle() |
Get the "Particle". |
GetValidOptionsForModuleProperty(property_name) |
Get all valid options only for properties that have a list of possible options. |
SetDefaultTemperature(value[, unit]) |
Set the value of "Default Temperature". |
SetFilePath(file_path) |
Set the path of the file that will be used to generate the particles described on the content of the file. |
SetModuleProperty(property_name, value[, unit]) |
Set the value of a module property. |
SetMotionFrame(motion_frame) |
Assign a Motion Frame to the custom input. |
SetParticle(value) |
Set the "Particle". |
GetAvailableMotionFrames()
Get all available Motion Frames.
- Return type:
List[
RAMotionFrame] A list ofRAMotionFrame.
GetAvailableParticles()
Get all available Particles.
- Return type:
List[
RAParticle] A list ofRAParticle.
GetDefaultTemperature(unit: str | None = None)
Get the value of “Default Temperature”.
- Parameters: unit – The unit for the returned value. If no unit is provided, the returned value will be in “K”.
GetFilePath()
Get the value of “File Path”.
- Return type: str
GetModuleProperties()
Get the names of the module properties.
- Return type: tuple(ModulePropertyIdentifier)
GetModuleProperty(property_name: str | ModulePropertyIdentifier, unit: str | None = None)
Get the value of a module property.
- Parameters:
- property_name (Union *[*str , ModulePropertyIdentifier ]) – The name of the module property to get.
- unit (str) – The unit for value, just for scalar properties. If no unit is provided, the returned value will be in the unit that was set before (via SetModuleProperty()).
- Return type:
float, bool, str or
RAModulePropertyList - Returns:
- For basic module properties like numbers and booleans, the returned value is a basic Python type (float, bool, or string)
- For input files, the returned value is the string of the full path to the file
- For properties that are lists of other properties, the returned value is a
:
RAModulePropertyList.
GetMotionFrame()
Get the “Motion Frame”.
- Return type:
RAMotionFrame
GetParticle()
Get the “Particle”.
- Return type:
RAParticle
GetValidOptionsForModuleProperty(property_name)
Get all valid options only for properties that have a list of possible options.
- Parameters: property_name (str) – The name of the module property.
- Return type: List[str]
SetDefaultTemperature(value: str | float, unit: str | None = None)
Set the value of “Default Temperature”.
- Parameters:
- value – The value to set. This value can be an expression with input variables or float type.
- unit – The unit for value. If no unit is provided, value is assumed to be in “K”.
SetFilePath(file_path)
Set the path of the file that will be used to generate the particles described on the content of the file.
The accepted file extensions are [“.csv”, “.xls”, “.xlsx”, “.xlsm”, “.xlsb”, “.odf”].
- Parameters: file_path (str or Path)
SetModuleProperty(property_name: str | ModulePropertyIdentifier, value: float | bool | str, unit: str | None = None)
Set the value of a module property.
- Parameters:
- property_name (Union *[*str , ModulePropertyIdentifier ]) – The name of the module property to set.
- value (float , bool or str) – The value to set. If the property_name references to an enum property then value must be an str value.
- unit (str) – The unit for value, just for scalar properties. If no unit is provided, value is assumed to be the unit was set before.
SetMotionFrame(motion_frame: RAMotionFrame | str | None)
Assign a Motion Frame to the custom input.
- Parameters: motion_frame – Either the API object or its name.
SetParticle(value)
Set the “Particle”.
:param unicode, RAParticle value:
: Either the API object wrapping the desired entity or its name.