Integer Switch [RvTools]:
The Integer Switch [RvTools] node is designed to facilitate decision-making processes within a node-based workflow by allowing you to switch between two integer inputs based on a specified condition. This node is particularly useful when you need to dynamically select between two integer values during execution, providing flexibility and control over the flow of data. By using this node, you can streamline your workflow, making it more efficient and adaptable to varying conditions or requirements. The primary function of this node is to evaluate a given input condition and return one of the two provided integer inputs, enabling you to implement conditional logic without complex scripting.
Integer Switch [RvTools] Input Parameters:
Input
The Input parameter is a required integer that determines which of the two optional integer inputs will be selected and returned by the node. It acts as a switch, where a value of 1 will select input1, and a value of 2 will select input2. This parameter has a default value of 1, with a minimum value of 1 and a maximum value of 2. By adjusting this parameter, you can control the flow of data and decide which integer input should be used in the subsequent steps of your workflow.
input1
The input1 parameter is an optional integer input that is selected when the Input parameter is set to 1. This parameter is marked with forceInput, meaning it must be provided if it is to be used. It allows you to specify the first integer value that can be conditionally returned by the node, providing a flexible option for dynamic data selection.
input2
The input2 parameter is an optional integer input that is selected when the Input parameter is set to 2. Similar to input1, this parameter is also marked with forceInput, requiring a value if it is to be utilized. It serves as the second integer option that can be conditionally returned, offering an alternative path for data flow based on the specified condition.
Integer Switch [RvTools] Output Parameters:
int
The int output parameter represents the integer value that is returned by the node based on the evaluation of the Input parameter. This output is crucial as it determines the integer value that will be passed on to subsequent nodes or processes in your workflow. By using this output, you can ensure that the correct integer value is utilized, maintaining the integrity and logic of your workflow.
Integer Switch [RvTools] Usage Tips:
- Ensure that both
input1andinput2are provided when using the node, as the absence of these inputs can lead to unexpected results or errors. - Use the
Inputparameter to dynamically control which integer value is selected, allowing for flexible and adaptable workflows that can respond to changing conditions or requirements.
Integer Switch [RvTools] Common Errors and Solutions:
Missing Input: Integer Switch has no active Input
- Explanation: This error occurs when neither
input1norinput2is provided, or when theInputparameter is set to a value outside the allowed range (1 or 2). - Solution: Ensure that both
input1andinput2are supplied with valid integer values, and verify that theInputparameter is set to either 1 or 2 to select the appropriate input.
